Skip to content

TokenValidatorInterface

Verifies a bearer token’s signature and standard time claims (exp/nbf/iat) and returns its raw claim set.

Implementations own algorithm allow-listing and key resolution (shared secret, JWKS, …); iss/aud pinning must also be enforced by the implementation, per RFC 8725 — a JWS library only guarantees signature and time validity, never audience restriction.

interface TokenValidatorInterface

Implemented byJwtTokenValidator
Since1.0.0
SourceTokenValidatorInterface.php
MethodDescription
validate(string $token): array<string, mixed>

abstract public function validate(string $token): array<string, mixed>

The raw, encoded token (e.g. the value after Bearer ).

ParameterTypeDescription
$tokenstringThe raw, encoded token (e.g. the value after Bearer ).

Returns array``<``string``, ``mixed``> — The validated, raw claim set.

ThrowsWhen
AuthenticationExceptionIf the token is malformed, expired, or fails signature/iss/aud checks.