acsystems/keycloak-authenticator-bundle
Laravel/PHP bundle that integrates Keycloak authentication into your app, providing Keycloak-based login and user session handling for protected routes and APIs with minimal configuration, suitable for SSO-enabled deployments.
symfony/http-foundation). May require abstraction layers for Laravel’s service container.Illuminate\Auth\Guard integration).Auth::attempt()) conflicts with stateless JWT; custom guards or facade overrides may be needed.symfony/http-client and league/oauth2-server; version conflicts possible if Laravel’s ecosystem diverges.aud, iss) must align with Keycloak’s defaults to avoid security gaps.AuthenticatorListener).AuthServiceProvider to bind the bundle’s services.KeycloakAuth::validateToken()) to abstract Symfony dependencies..env)?league/oauth2-client vs. Keycloak’s introspection endpoint)?sub, email) for Laravel’s auth system?symfony/http-client via guzzlehttp/guzzle).aud (audience) and iss (issuer) claims.league/oauth2-server (for JWT validation) → May conflict with Laravel’s laravel/socialite; evaluate alternatives like lucadegasperi/oauth2-server-laravel.symfony/http-foundation → Use Laravel’s Illuminate\Http as a drop-in replacement where possible.ValidateKeycloakToken).AuthManager to support JWT guards.Auth::user() with JWT payload parsing where needed.Authenticator).Authorization: Bearer <token>).JwtGuard) to integrate with Illuminate\Auth.HandleKeycloakAuth).HttpTests with mocked Keycloak responses.session()->get('user')) will fail; migrate to request-based JWT access.exp claims).email for Laravel’s auth system).jwt.io to decode tokens for debugging.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Keycloak downtime | Auth failures across all services | Local auth fallback or circuit breakers. |
| Expired/invalid JWT | API/feature access denied | Implement refresh token logic. |
| Clock skew (token validation) | False auth failures | Sync server clocks (NTP). |
| Missing claims in JWT | Laravel auth system breaks | Validate required claims upfront. |
| Dependency conflicts | Bundle fails to load | Isolate in a separate Composer package. |
How can I help you explore Laravel packages today?