Package com.rnett.krosstalk.ktor.client.auth

Auth scopes for the Krosstalk Ktor client plugin. See module description.

Types

Link copied to clipboard
data class BearerAuthTokens(accessToken: String, refreshToken: String?)

Bearer auth tokens, similar to BearerTokens except the refresh token is optional.

Link copied to clipboard
abstract class KtorClientAuth<D> : KtorClientScope<D>

A base Ktor client authentication scope.

Link copied to clipboard
open class KtorClientBasicAuth(sendWithoutRequest: Boolean, realm: String?) : KtorClientAuth<BasicAuthCredentials>

A Ktor client Basic authentication scope.

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

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

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

A Ktor client Bearer authentication scope that is passed tokens.

Functions

Link copied to clipboard
operator fun <T : KtorClientBasicAuth> T.invoke(username: String, password: String): ScopeInstance<T>

Create a basic auth scope instance by providing the username and password.

operator fun <T : KtorClientBearerTokenAuth> T.invoke(accessToken: String, refreshToken: String? = null): ScopeInstance<T>

Create a bearer auth scope instance by providing the access token and optionally a refresh token.