OpaqueTokenConfig

Configuration for the opaqueToken strategy factory.

lookup is required. The identity type your OpaqueTokenLookup returns is your own — bring your own type; roles come from OpaqueTokenDetails.roles. Builds an OpaqueTokenAuthenticator, and selects a BearerChallengeUnauthorizedHandler when bearerChallenge is true.

Properties

Link copied to clipboard

When true, failed or absent authentication includes a WWW-Authenticate: Bearer header with the 401 response (via BearerChallengeUnauthorizedHandler).

Link copied to clipboard

Clock used for OpaqueTokenDetails.expiresAt validation. Defaults to Clock.systemUTC.

Link copied to clipboard

Renders 403 responses for authenticated callers denied by authorization. Defaults to a bare 403.

Link copied to clipboard

Resolves a raw opaque token to its stored OpaqueTokenDetails. Required; throws SecurityConfigurationException if unset when the strategy is built.

Link copied to clipboard

Realm attribute included in the WWW-Authenticate header when bearerChallenge is true.

Link copied to clipboard

Locates the raw token in the request. Defaults to TokenResolver.DEFAULT (Authorization: Bearer ...).

Link copied to clipboard

Renders 401 responses for failed or absent authentication. Defaults to UnauthorizedHandler.DEFAULT (bare HTTP 401). Ignored when bearerChallenge is true.