Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Oauth Subscriber Laravel Package

guzzlehttp/oauth-subscriber

OAuth 1.0 middleware for Guzzle that signs outgoing requests with your consumer key, secret, token, and token secret when the auth option is oauth. Add it to a Guzzle handler stack for APIs that require OAuth 1.0 request signing instead of OAuth 2.0 bearer tokens.

View on GitHub
Deep Wiki
Context7

Guzzle OAuth Subscriber

guzzlehttp/oauth-subscriber is OAuth 1.0 middleware for Guzzle. It signs outgoing Guzzle requests with OAuth credentials when the request uses the auth option value oauth.

Use this package when an API requires OAuth 1.0 request signing. If an API uses OAuth 2.0 bearer tokens, you usually do not need this package; send an Authorization: Bearer ... header with Guzzle instead.

Installation

composer require guzzlehttp/oauth-subscriber

Version Guidance

Version Status PHP Version
1.0 Latest >=7.4,<8.7
0.9 Maintenance >=7.2.5,<8.7

Quick Start

use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Subscriber\Oauth\Oauth1;

$stack = HandlerStack::create();
$stack->push(new Oauth1([
    'consumer_key' => 'my_key',
    'consumer_secret' => 'my_secret',
    'token' => 'my_token',
    'token_secret' => 'my_token_secret',
]));

$client = new Client([
    'base_uri' => 'https://api.example.com/',
    'handler' => $stack,
]);

$response = $client->get('resource', ['auth' => 'oauth']);

You can also set 'auth' => 'oauth' as a client default when every request sent by that client should be signed.

Documentation

Security

OAuth credentials are secrets. Avoid logging request options that contain oauth values, and make sure retry middleware re-enters this middleware when refreshed credentials must be used.

If you discover a security vulnerability within this package, please send an email to [email protected]. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see Security Policy for more information.

License

Guzzle OAuth Subscriber is made available under the MIT License (MIT). Please see License File for more information.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package