Basic Auth Provider
class BasicAuthProvider(credentials: suspend () -> BasicAuthCredentials?, realm: String? = null, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { false }, cacheTokens: Boolean) : AuthProvider(source)
An authentication provider for the Basic HTTP authentication scheme. The Basic authentication scheme can be used for logging in users.
You can learn more from Basic authentication.
Constructors
Link copied to clipboard
constructor(credentials: suspend () -> BasicAuthCredentials?, realm: String? = null, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { false }, cacheTokens: Boolean)
constructor(credentials: suspend () -> BasicAuthCredentials?, realm: String? = null, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { false })
Functions
Link copied to clipboard
open suspend override fun addRequestHeaders(request: HttpRequestBuilder, authHeader: HttpAuthHeader? = null)
Adds an authentication method headers and credentials.
Link copied to clipboard
Clears the currently stored authentication credentials from the cache.
Link copied to clipboard
Checks if the current provider is applicable to a request.
Link copied to clipboard
Refreshes a token if required.
Link copied to clipboard