Documentation
¶
Overview ¶
Package bearer provides middleware that validates an Authorization: Bearer JWT against a jwks.KeySet and attaches the claims to the request context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimsFromContext ¶
ClaimsFromContext returns the verified token claims, or nil if absent.
func Middleware ¶
Middleware enforces a verifiable bearer token on every wrapped handler. When requireAudience is non-empty the token's `aud` claim must contain that value (matches Auth0's tenant-API-audience binding). Empty preserves the "echoed, not enforced" behaviour the README documents for tests that swap audiences freely.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.