BasicAuthConfig

Configuration for the basicAuth strategy factory (HTTP Basic, RFC 7617).

userLookup is required. The identity type your UserLookup returns is your own — bring your own type; roles come from BasicUserDetails.roles. Builds a BasicAuthenticator and, when basicChallenge is true, a BasicChallengeUnauthorizedHandler; otherwise uses UnauthorizedHandler.DEFAULT. HTTP-only — there is no WebSocket variant.

Properties

Link copied to clipboard

When true, failed or absent authentication includes a WWW-Authenticate: Basic ... header. Defaults to false.

Link copied to clipboard

Locates raw credentials in the request. Defaults to BasicCredentialsResolver.DEFAULT (Authorization: Basic ...).

Link copied to clipboard

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

Link copied to clipboard

Compares the caller's raw password against the stored encoded password. Defaults to PasswordEncoder.noOp.

Link copied to clipboard

Realm attribute for the Basic challenge when basicChallenge is true. Defaults to "API".

Link copied to clipboard

Resolves a username to its stored BasicUserDetails. Required; throws SecurityConfigurationException if unset when the strategy is built.