careerum/laravel-keycloak-web-guard
A Laravel authentication guard for integrating Keycloak with the web guard. It lets you protect routes and authenticate users through Keycloak’s OpenID Connect/OAuth2 flow, with configuration and a guard driver for session-based login.
Authorization headers, client_secret, authorization codes, tokens, and Guzzle exception messages into logs; only exception class, method, URL (sans userinfo), query, fragment and HTTP status are recorded. That is a direct enabler for log-hygiene requirements in SOC 2 / ISO 27001 / GDPR reviews and for passing customer security questionnaires on credential handling.getPrevious() on discovery failures keeps root-cause visibility for support and on-call while keeping sensitive payloads out of logs — a decision point for how much auth detail support staff get.^7.0 || ^8.0 (Guzzle 6 dropped) defines the supported dependency envelope; it gates whether this can ship on the current Laravel/PHP baseline and sets the dependency-modernization timeline.Consider it when:
Look elsewhere when:
To executives: This is the piece that lets us offer enterprise-grade single sign-on without building and maintaining an OIDC client ourselves. Customers who run their own identity provider — common in regulated, on-prem, and larger B2B accounts — can be onboarded through configuration instead of custom engineering. The new release materially improves our security story: credentials, tokens, and secrets no longer reach our logs, which is the kind of finding that stalls enterprise security reviews. It also makes login more resilient when the identity provider has an outage, and it ships with an automated test suite and CI, so it is a supported dependency rather than a bespoke liability. The main migration cost is a HTTP client upgrade off Guzzle 6.
To engineering: v3.4.0 is a security-and-hardening release. Logging of Keycloak request/response headers and bodies is removed (Authorization, client_secret, authorization codes, tokens), and Guzzle exception messages are no longer logged — only exception class, method, sanitized URL, and HTTP status. The network-error-without-response logging path no longer throws. Discovery failures now chain the original exception via getPrevious(), so we keep root cause without sensitive payloads. Guzzle support is ^7.0 || ^8.0; Guzzle 6 is dropped — treat this as the breaking change and audit composer.lock and transitive constraints before upgrading. PHPUnit/Testbench tests and CI now run against both Guzzle 7 and 8, so we get a verified upgrade path going forward.
How can I help you explore Laravel packages today?