All notable changes to this package are documented here. The format follows Keep a Changelog; this package adheres to Semantic Versioning.
Claims::$givenName/Claims::$familyName— OIDCgiven_name/family_nameclaims (scopeprofile). The auth server now storesgiven_nameandfamily_nameseparately from the displayname.Claims::$phoneNumber/Claims::$phoneNumberVerified— OIDCphone_numberandphone_number_verifiedclaims under the newphonescope. Requestscope=phoneatbeginAuthorization()to receive them.
- All new claims are nullable; tokens issued without the relevant scope (or by
pre-1.1 servers) keep them as
null— no breaking change for consumers that only reademail/name/roles/groups.
Initial public release.
Client::beginAuthorization()— build Authorization Code + PKCE URL withstateandPkcepair.Client::exchangeCode()— exchange authorization code forTokenSet.Client::refresh()— refresh access token (rotation supported).Client::clientCredentials()— machine-to-machine flow.Client::userInfo()— call/mewith a Bearer token.Client::verify()— local JWT verification via JWKS.Client::logoutUrl()— build end-session URL.Client::discover()— fetch OIDC discovery document.Claimsvalue object with rich API:hasRole,hasAnyRole,hasAllRoles,hasProjectRole,rolesForProject,hasGroup,hasAnyGroup,hasAllGroups,hasScope,requireRole,requireAnyRole,requireGroup,requireScope,requireUserToken,requireServiceToken,isExpired,secondsUntilExpiration,displayName,audience,claim.TokenSetwithisExpired,authorizationHeader.Pkce::generate()andPkce::challengeFor().TokenVerifierwith strict RFC 9068 enforcement (iss,token_use,aud).JwksCacheInterfacewithInMemoryJwksCache,ApcuJwksCacheandFileJwksCacheimplementations.HttpClientInterfacewithCurlHttpClientdefault implementation.- Exception hierarchy:
AuthClientException(base),ConfigurationException,TransportException,OAuthServerException,TokenVerificationException,AuthorizationException.
- JWT parsing and validation via
lcobucci/jwt: ^5.5. The auth server uses the same library transitively (throughleague/oauth2-server), so both ends share the same JWT interpretation.firebase/php-jwtwas rejected due to current composer audit advisories. - JWK→PEM bridge in
Internal/JwkRsaKey.lcobucci/jwtaccepts PEM keys only; JWKS publishes JWK. The bridge emits standard ASN.1 SubjectPublicKeyInfo (≈70 LoC). - In-house PSR-20
SystemClock. Avoids pullinglcobucci/clockfor a one-method class. - Strict mode by default.
issandtoken_useclaims are required; missing or empty values raiseTokenVerificationException. - JWKS cache
kid-rotation. Onkidmiss, the cache is invalidated and re-fetched once automatically before failing — supports key rotation without restart. - Defensive parsing of optional
scopesshapes. Accepts both whitespace-separated string andlist<string>.