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

Product Decisions This Supports

  • Roadmap: preserve legacy integrations without blocking modernization. Use this package when a Laravel product must call partner or enterprise APIs that still require OAuth 1.0 request signing. It lets the team keep those integrations alive while standardizing new work on OAuth 2.0/OpenID Connect.
  • Build vs. buy: buy the signing layer. The package is MIT-licensed, maintained under the Guzzle organization, documented, and changelogged. It handles nonce generation, parameter normalization, signature base strings, HMAC-SHA256, RSA-SHA1, and body hashing. Owning that logic in-house is security-sensitive and hard to justify unless requirements are unusual.
  • Architecture fit: introduce it as Guzzle middleware, not a Laravel-specific dependency. Laravel’s HTTP client is Guzzle-based, so the package can be wired through a HandlerStack with a small application wrapper. There is no service provider, config file, database migration, or framework coupling to own.
  • Feature scoping: support multiple credential models. Client-wide auth => 'oauth' suits single-credential integrations. Per-request token/token_secret overrides support multi-tenant, partner-specific, or user-specific routing. Two-legged OAuth supports server-to-server calls where no user token exists.
  • Dependency and version planning: resolve the Laravel/Guzzle matrix before committing. v1.x requires PHP >=7.4,<8.7 and Guzzle ^8.0/^8.1; v0.9.x is the maintenance line for Guzzle 7.15+. Many Laravel applications will need the 0.9 line unless they have adopted Guzzle 8. Treat this as an explicit product-engineering decision, not an afterthought.
  • Security and upgrade planning: use recent releases as part of the case. The package has addressed nonce entropy (CVE-2025-21617), RSA configuration validation, duplicate parameters, sensitive exception data, and PHP 8.5/8.6 compatibility. This supports upgrading PHP/Guzzle while retaining legacy API connectivity.
  • Scope boundary: sign requests, but own the full credential lifecycle. The package does not acquire tokens, run the OAuth 1.0 authorization flow, refresh credentials, store secrets, redact logs, or guarantee retry behavior. Product scope must include secret storage, credential rotation, observability, and retry semantics.
  • Prioritization: fund this only where an API mandates OAuth 1.0. It is a targeted compatibility tool, not a strategic platform investment. Deprioritize it for greenfield APIs that support OAuth 2.0 or for providers with an official SDK that already handles authentication and API behavior.

When to Consider This Package

  • Adopt when the target API requires OAuth 1.0 request signing and the application uses Guzzle 7.15+ or Guzzle 8.1+ on a compatible PHP version.
  • Adopt when the application is Laravel-based and already uses Laravel’s Guzzle-backed HTTP client; integration is a thin middleware wrapper rather than a new HTTP abstraction.
  • Adopt when you want signing to compose with existing Guzzle middleware for retries, logging, tracing, and error handling instead of building a bespoke signing path.
  • Adopt when you need per-request token overrides for multi-tenant or partner credentials, two-legged OAuth, HMAC-SHA256, RSA-SHA1, or OAuth body-hash support.
  • Adopt when a small, MIT-licensed, actively maintained package is preferable to custom cryptography and signature edge-case handling.
  • Evaluate carefully when the workload is high-volume RSA-SHA1 signing, the integration is business-critical with strict uptime requirements, or the team needs vendor support/SLAs. Benchmark and plan for internal ownership.
  • Look elsewhere when the API supports OAuth 2.0 or OpenID Connect; use an OAuth 2.0 client and bearer-token handling instead.
  • Look elsewhere when you need a complete OAuth 1.0 authorization flow, token exchange, refresh orchestration, callback routes, or credential lifecycle management. This package signs requests; it is not a full OAuth client.
  • Look elsewhere when you are constrained to PHP below 7.2.5, Guzzle below 7.11, or a non-Guzzle/PSR-7-compatible HTTP stack.
  • Look elsewhere when an official provider SDK already covers authentication, pagination, retries, and API-specific behavior with acceptable maintenance and support terms.
  • Before adopting, confirm that secrets are stored outside request options and logs, that retry middleware re-enters signing on every attempt, and that the chosen package version matches the application’s Laravel/Guzzle/PHP matrix.

How to Pitch It (Stakeholders)

Executives: “This is a small, MIT-licensed, Guzzle-maintained middleware that lets us keep legacy OAuth 1.0 partner integrations working without custom security-sensitive signing code. It reduces delivery time and technical debt for a narrow compatibility need, supports modern PHP releases, and has recent security fixes. It is not an OAuth 2.0 solution, so we should use it only where an API specifically requires OAuth 1.0 signing, and we should budget for credential storage and operational ownership.”

Engineering: “Push the Oauth1 middleware onto a Guzzle HandlerStack, enable signing with auth => 'oauth', and optionally override token/token_secret per request. It fits Laravel because Laravel’s HTTP client is Guzzle-based, so we can wrap it in a small application service without adding framework coupling. We get HMAC-SHA256, RSA-SHA1, two-legged OAuth, and per-request credential switching with minimal boilerplate. Requirements: verify Guzzle/PHP compatibility first — v1.x targets Guzzle 8, while v0.9.x supports Guzzle 7.15+ — store secrets securely, avoid logging OAuth request options, and ensure retries re-enter signing.”

Security: “Prefer this over hand-rolled OAuth 1.0 signing. Recent releases address nonce entropy, RSA validation, duplicate parameters, and sensitive exception handling, and the package rejects unsafe serialization and non-finite OAuth parameters. Keep consumer secrets and token secrets in secret storage, never log the oauth request option, pin and monitor versions and advisories, and test retry paths so every attempt is freshly signed.”

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource