KtorClientBearerAuth

abstract class KtorClientBearerAuth<T>(sendWithoutRequest: Boolean, realm: String?) : KtorClientAuth<T>

A Ktor client Bearer authentication scope that loads tokens based on passed data.

Constructors

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

Functions

Link copied to clipboard
override fun Auth.configureClientAuth(data: T)
Link copied to clipboard
abstract suspend fun loadTokens(data: T): BearerTokens?

Used as Ktor's BearerAuthConfig.loadTokens.

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

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

Properties

Link copied to clipboard
val realm: String? = null
Link copied to clipboard
val sendWithoutRequest: Boolean = true

Inheritors

Link copied to clipboard

Sources

Link copied to clipboard