BasicAuthProvider
class BasicAuthProvider(credentials: suspend () -> BasicAuthCredentials?, realm: String?, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean) : AuthProvider
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
fun BasicAuthProvider(credentials: suspend () -> BasicAuthCredentials?, realm: String? = null, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { false })
Content copied to clipboard
Functions
Link copied to clipboard
open suspend override fun addRequestHeaders(request: HttpRequestBuilder, authHeader: HttpAuthHeader?)
Content copied to clipboard
Adds an authentication method headers and credentials.
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
open override fun sendWithoutRequest(request: HttpRequestBuilder): Boolean
Content copied to clipboard
Properties
Link copied to clipboard
Waits for HttpStatusCode.Unauthorized to send credentials.