Skip to content

Auth

Everything under Quiote\Security\Auth.

ClassDescription
AuthPluginRegisters the authentication foundation: a default PasswordHasherInterface, an empty (no-op) default FirewallMap, and two AuthenticationMiddleware placements (StatelessAuthenticationMiddleware before Quiote\Middleware\SessionMiddleware, so a machine token can flip a request to sessionless before session startup; SessionAuthenticationMiddleware before Quiote\Middleware\SecurityMiddleware, so a successful login is visible to the same request’s authorization decision).
AuthenticationExceptionThrown by an AuthenticatorInterface when a presented credential (password, Basic header, bearer token, …) fails to establish an identity.
AuthenticationManagerRuns a firewall’s authenticator chain against a request and, on success, populates the request’s SecurityUser/RbacSecurityUser.
AuthorizationHeaderParses an Authorization header into its scheme and credential, the way RFC 9110 §11.6.2 actually specifies it rather than the way the wire format usually looks.
BearerTokenAuthenticatorValidates an Authorization: Bearer token via a TokenValidatorInterface (JWS verify + iss/aud), derives its ClientType via a ClientTypeResolverInterface, and resolves the identity via UserProviderInterface::loadByToken().
ClientAddressThe connecting peer’s address, for use as a throttle key.
ClientCredentialsClientOutbound M2M: fetches an access token via the Client Credentials grant for the app to present to another service.
ClientTypeResolverThe default ClientTypeResolverInterface: applies the RFC 9068 rule — service when the token’s sub equals its client_id/azp (the authority mints machine/client-credentials tokens this way), otherwise user.
FirewallA named, path-matched set of authenticators plus the entry point that handles a failed authentication attempt for that path — the runtime counterpart of a security.xml <firewall> element.
FirewallMapAn ordered list of Firewall definitions, matched by request path.
IntrospectionClientA ~30-line RFC 7662 (OAuth 2.0 Token Introspection) POST helper — league/oauth2-client has none.
JwtAuthPluginRegisters the default ClientTypeResolverInterface (the RFC 9068 rule — see ClientTypeResolver).
JwtTokenValidatorVerifies a JWS via firebase/php-jwt (JWKS + rotation via CachedKeySet for RS256/ES256, or a single Key for a shared HS256 secret) and enforces iss/aud — the library itself only checks exp/nbf/iat.
OidcAuthenticatorThe callback leg of the OIDC Authorization Code + PKCE flow: verifies state (exact, constant-time comparison), exchanges the code for tokens via OidcClient, validates the ID token (signature/iss/ aud via the injected TokenValidatorInterface, plus our own nonce check — at_hash is intentionally not checked: it is only REQUIRED by OIDC core when an access token is returned from the authorization endpoint (implicit/hybrid flows), and OPTIONAL for a pure Authorization Code exchange at the token endpoint, which is the only flow this class implements), then maps the claims to a UserIdentity via UserProviderInterface::loadByToken() — the same seam packages/auth-jwt’s BearerTokenAuthenticator uses.
OidcAuthorizationRequestThe result of OidcClient::buildAuthorizationRequest(): the URL to redirect the browser to, plus the state/PKCE-verifier/nonce the caller must persist (e.g.
OidcAuthorizationStateThe per-attempt secrets an OIDC auth-code + PKCE flow must round-trip through the user’s session between the authorization redirect and the callback: the CSRF-style state, the PKCE code_verifier, and the OIDC nonce (replay/injection protection for the ID token).
OidcClientWraps league/oauth2-client’s generic provider (via SpaceDelimitedScopeProvider, which fixes the library’s comma-delimited scope parameter) for the OIDC Authorization Code flow.
OidcDiscoveryClientFetches an OpenID provider’s metadata from {issuer}/.well-known/openid-configuration (OpenID Connect Discovery 1.0 §4) so an app can wire OidcClient, ClientCredentialsClient, IntrospectionClient and auth-jwt’s JWKS key set from one issuer URL instead of five hand-copied endpoint strings that silently rot when the provider moves them.
OidcDiscoveryDocumentAn immutable OpenID Provider metadata document (OpenID Connect Discovery 1.0 §3, a superset of RFC 8414 authorization-server metadata), as fetched by OidcDiscoveryClient.
OidcStateStoragePersists a single in-flight OidcAuthorizationState in the session-backed Context storage, keyed by its own state value so a concurrent second login attempt in another tab doesn’t clobber the first.
PassportThe resolved outcome of a successful AuthenticatorInterface::authenticate() call: the identity plus the credentials/roles to grant, and whether the identity is stateless (re-derived from the credential every request rather than read back from the session).
SpaceDelimitedScopeProviderleague/oauth2-client’s AbstractProvider::getScopeSeparator() returns a comma and GenericProvider does not override it, so a multi-scope authorization request comes out as scope=openid%2Cprofile%2Cemail.
TokenClaimsValidated claims from a bearer/JWT/OIDC token, plus the ClientType derived from them by a ClientTypeResolverInterface.
InterfaceDescription
AuthenticatorInterfaceGeneralizes Quiote\Mcp\Auth\McpAuthenticatorInterface into a framework-wide contract: one implementation per credential mechanism (form login, HTTP Basic, bearer/JWT, OIDC).
ClientTypeResolverInterfaceDerives ClientType from a set of already-validated token claims.
EntryPointInterfaceProduces the failure response for a firewall when authentication is required but absent/invalid: a LoginRedirectEntryPoint (reuses the existing ForwardService login flow) for session/form firewalls, or an HttpChallengeEntryPoint (401 + WWW-Authenticate, RFC 7807 JSON, matching Quiote\Mcp\Middleware\McpAuthMiddleware) for token firewalls.
PasswordHasherInterfaceThin contract over PHP’s password_hash() family, so FormLoginAuthenticator/HttpBasicAuthenticator (both in the future packages/auth) depend on an interface rather than the global functions directly.
PasswordProtectedUserIdentityA UserIdentity that can be checked against a password, resolved by InMemoryUserProvider/PdoUserProvider/CallableUserProvider and consumed by FormLoginAuthenticator/HttpBasicAuthenticator via PasswordHasherInterface.
TokenValidatorInterfaceVerifies a bearer token’s signature and standard time claims (exp/nbf/iat) and returns its raw claim set.
UserIdentityThe identity a UserProviderInterface resolves a credential to, before it is mapped onto a Quiote\User\SecurityUser/RbacSecurityUser by Quiote\Security\Auth\AuthenticationManager (packages/auth).
UserProviderInterfaceLoads a UserIdentity either by a stable identifier (form login, HTTP Basic) or from validated token claims (bearer/JWT/OIDC).
EnumDescription
ClientTypeDistinguishes a human end-user from a machine/service caller, per the RFC 9068 rule applied by ClientTypeResolverInterface: Service when the token’s sub equals its client_id/azp, otherwise User.
NamespaceContents
Authenticator2 types
Config2 types
EntryPoint2 types
Hasher2 types
Identity1 type
Middleware2 types
Provider3 types