DigestAuthProvider

class DigestAuthProvider(credentials: suspend () -> DigestAuthCredentials?, val realm: String? = null, val algorithmName: String = "MD5") : AuthProvider(source)

An authentication provider for the Digest HTTP authentication scheme.

You can learn more from Digest authentication.

Report a problem

Constructors

Link copied to clipboard
constructor(credentials: suspend () -> DigestAuthCredentials?, realm: String? = null, algorithmName: String = "MD5")
constructor(username: String, password: String, realm: String? = null, algorithmName: String = "MD5")

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val sendWithoutRequest: Boolean

Waits for HttpStatusCode.Unauthorized to send credentials.

Functions

Link copied to clipboard
open suspend override fun addRequestHeaders(request: HttpRequestBuilder, authHeader: HttpAuthHeader?)

Adds an authentication method headers and credentials.

Link copied to clipboard
open override fun clearToken()

Clears the currently stored authentication tokens from the cache.

Link copied to clipboard
open override fun isApplicable(auth: HttpAuthHeader): Boolean

Checks if the current provider is applicable to a request.

Link copied to clipboard
open suspend override fun refreshToken(response: HttpResponse): Boolean

Refreshes a token if required.

Link copied to clipboard
open override fun sendWithoutRequest(request: HttpRequestBuilder): Boolean