bshaffer/oauth2-server-httpfoundation-bridge
Symfony HttpFoundation bridge for bshaffer/oauth2-server, enabling OAuth2 requests and responses to work seamlessly with Symfony/Laravel HttpFoundation objects. Provides adapters to integrate the OAuth2 server with HttpFoundation-based apps.
HttpFoundation). Ideal for teams prioritizing developer velocity over customization.Request/Response objects, reducing flakiness in CI/CD pipelines.Adopt if:
HttpFoundation (directly or via Laravel).Symfony\Component\HttpFoundation\Request).Look elsewhere if:
league/oauth2-client or Laravel Passport’s client features).oauth2-server-php or Laravel Passport).HttpFoundation interoperability (Passport is a higher-level solution).For Executives:
"This package lets us securely expose our APIs to third parties or internal teams with OAuth2—without building a custom authentication system from scratch. It’s a lightweight, framework-friendly way to add token-based authentication, reducing security risks and developer overhead. Think of it as ‘Plug-and-Play OAuth2’ for Laravel, with built-in support for testing and future-proofing. The MIT license and active maintenance mean low risk, while the HttpFoundation bridge ensures it integrates seamlessly with our existing stack. This supports our roadmap for API monetization, partner integrations, and modular services."
For Engineers: *"This bridge solves two critical pain points:
Request/Response objects to/from OAuth2 standards, eliminating manual parsing of query params or headers. For example, replacing:
$code = $_GET['code'] ?? null;
with:
$request = OAuth2\HttpFoundationBridge\Request::createFromGlobals();
$server->grantAccessToken($request);
It’s a drop-in solution for bshaffer/oauth2-server-php, so we avoid reinventing OAuth2 while keeping our codebase consistent. Perfect for APIs, developer portals, or SSO systems where standardization matters more than customization."*
For Security Teams:
"This package provides a compliant OAuth2 implementation (RFC 6749) with minimal attack surface, as it’s built on top of oauth2-server-php, a widely audited library. The bridge ensures consistent request/response handling, reducing the risk of misconfigurations (e.g., improper token validation). Additionally, it integrates with Laravel’s middleware pipeline, allowing us to enforce security policies (e.g., rate limiting, CORS) alongside OAuth2 logic."
How can I help you explore Laravel packages today?