KtorClientBearerTokenAuth

open class KtorClientBearerTokenAuth(sendWithoutRequest: Boolean, realm: String?) : KtorClientBearerAuth<BearerAuthTokens>

A Ktor client Bearer authentication scope that is passed tokens.

Constructors

Link copied to clipboard
fun KtorClientBearerTokenAuth(sendWithoutRequest: Boolean = true, realm: String? = null)

Functions

Link copied to clipboard
suspend override fun loadTokens(data: BearerAuthTokens): BearerTokens

Used as Ktor's BearerAuthConfig.loadTokens.

Link copied to clipboard
suspend override fun refreshTokens(data: BearerAuthTokens, response: HttpResponse): BearerTokens?

Used as Ktor's BearerAuthConfig.refreshTokens. Calls loadTokens by default.

Sources

Link copied to clipboard