BasicAuthenticator

Implements HTTP Basic authentication (RFC 7617).

Extracts BasicCredentials via BasicCredentialsResolver: missing credentials yield AuthenticationResult.NotAuthenticated; malformed credentials yield AuthenticationResult.Failure. Looks up the username via UserLookup and compares the raw password with PasswordEncoder; an unknown username or password mismatch yields AuthenticationResult.Failure. On success, returns AuthenticationResult.Success with the looked-up identity and roles. Construct via basicAuth { } or Builder.

Types

Link copied to clipboard
class Builder(userLookup: UserLookup)

Fluent builder for constructing a BasicAuthenticator.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun authenticate(context: Context): AuthenticationResult