StaticBearerTokenAuthenticator
final class StaticBearerTokenAuthenticator implements ApiAuthenticatorInterface (View source)
Verifies one configured bearer token in constant time and creates an external API identity.
Methods
__construct(string|null $token, array $scopes = [])
Captures the optional token used for later verification and the permissions assigned on success.
authenticate(ServerRequestInterface $request)
Returns an external static-token identity for an exact bearer match, or null otherwise.
ApiIdentity|null
Details
__construct
__construct(string|null $token, array $scopes = [])
Captures the optional token used for later verification and the permissions assigned on success.
authenticate
ApiIdentity|null
authenticate(ServerRequestInterface $request)
Returns an external static-token identity for an exact bearer match, or null otherwise.