BasicChallengeUnauthorizedHandler

An UnauthorizedHandler that includes a WWW-Authenticate: Basic challenge (RFC 7617) on 401 responses.

Enable by setting basicChallenge = true in the basicAuth { } block (optional realm, default "API"). The response body is empty; only the challenge header is sent. Failure detail is never exposed, regardless of whether failure is present.

Constructors

Link copied to clipboard
constructor(realm: String = "API")

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun handle(context: Context, failure: AuthenticationResult.Failure?)