BearerAuthConfig

class BearerAuthConfig

A configuration for BearerAuthProvider.

Constructors

Link copied to clipboard
fun BearerAuthConfig()

Functions

Link copied to clipboard
fun loadTokens(block: suspend () -> BearerTokens?)

Configures a callback that loads a cached token from a local storage. Note: Using the same client instance here to make a request will result in a deadlock.

Link copied to clipboard
fun refreshTokens(block: suspend RefreshTokensParams.() -> BearerTokens?)

Configures a callback that refreshes a token when the 401 status code is received.

Link copied to clipboard
fun sendWithoutRequest(block: (HttpRequestBuilder) -> Boolean)

Sends credentials without waiting for HttpStatusCode.Unauthorized.

Properties

Link copied to clipboard
var realm: String? = null