Skip to main content

Module bearer

Module bearer 

Source
Expand description

Authorization: Bearer access tokens presented to this server’s own resource APIs.

Structs§

BearerGrant
The user’s grant to the client a BearerToken was issued to.
BearerToken
A still-valid Bearer token of an active user, issued to a client that may use Bearer tokens.
TokenSubject
Who a request authenticated with an access token acts for. Token-authenticating middlewares put it in the request extensions, where per-user and per-grant rate limits read it.

Enums§

BearerTokenError
Why a Bearer token wasn’t accepted.

Functions§

bearer_token
The token of an Authorization: Bearer <token> header value, for resolve_bearer_token.
resolve_bearer_token
Resolves a token presented as Authorization: Bearer. A sender-constrained (DPoP) token is rejected, since these APIs verify no proof of possession. Callers check scopes and audience.
split_authorization
The scheme and credentials of an Authorization header value. Schemes are case-insensitive (RFC 9110 §11.1), so compare them with eq_ignore_ascii_case.