facile-it/php-openid-client
Full-featured PHP OpenID Connect/OAuth2 client with discovery and dynamic client registration. Supports authorization flows, refresh/client credentials grants, userinfo & ID tokens, JWT signing/encryption, request objects, token revocation/introspection, and advanced client auth.
Pros:
private_key_jwt, client_secret_jwt) support advanced security scenarios like mutual TLS (MTLS).AuthRedirectHandler, CallbackMiddleware) enables modular, framework-agnostic integration (e.g., Laravel, Symfony, Lumen).Cons:
GuzzleHttp, Symfony HttpClient) and caching systems (e.g., Illuminate\Cache).AuthRedirectHandler for route-based auth).dflydev/fig-cookies for session management (Laravel’s native session system could be a drop-in replacement).auth.attempted, auth.login).SessionCookieMiddleware) may require significant adaptation to Laravel’s ecosystem.Psr\SimpleCache) needs explicit configuration.state parameter) must align with Laravel’s built-in mechanisms (e.g., XSRF-TOKEN).Issuer metadata), repeated calls to .well-known/openid-configuration could impact latency.socialiteproviders) is straightforward.private_key_jwt) needed, or will basic client_secret_basic suffice?auth:attempt or sanctum need integration with OIDC tokens?dflydev/fig-cookies for state/nonce persistence?invalid_grant) map to Laravel’s exception system (e.g., AuthenticationException)?Issuer metadata/JWKS critical, or can the library’s defaults suffice?Kernel.php) or per-route?mockoon, oidc-provider) available for CI/CD testing?Http facade or GuzzleHttp (injected via ClientBuilder).Illuminate\Cache (PSR-16) for Issuer metadata/JWKS caching.dflydev/fig-cookies with Laravel’s session system for state/nonce storage.Handle interface (e.g., wrap AuthRedirectHandler in a Laravel middleware).Client, Issuer, and services.AuthManager to support OIDC tokens (e.g., IdTokenGuard).session() helper for cookie-based state management.users table or a dedicated oauth_tokens table.AuthRedirectHandler + Laravel routes).dflydev/fig-cookies with Laravel’s session system.Issuer metadata/JWKS.private_key_jwt) if needed.auth.login for OIDC events).GuzzleHttp or Symfony HttpClient.web-token/jwt-framework (v1.0+); ensure no conflicts with Laravel’s JWT packages (e.g., tymon/jwt-auth).HandleAuthRedirect).AuthSessionInterface contract (may require adapter).composer require facile-it/php-openid-client guzzlehttp/guzzle symfony/http-client dflydev/fig-cookies
Issuer metadata.oidc-provider).web-token/jwt-framework and dflydev/fig-cookies for updates.How can I help you explore Laravel packages today?