Package io.ktor.client.plugins.auth.providers

Types

Link copied to clipboard
class BasicAuthConfig

A configuration for BasicAuthProvider.

Link copied to clipboard
class BasicAuthCredentials(username: String, password: String)

Contains credentials for BasicAuthProvider.

Link copied to clipboard
class BasicAuthProvider(credentials: suspend () -> BasicAuthCredentials?, realm: String?, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean) : AuthProvider

An authentication provider for the Basic HTTP authentication scheme. The Basic authentication scheme can be used for logging in users.

Link copied to clipboard
class BearerAuthConfig

A configuration for BearerAuthProvider.

Link copied to clipboard
class BearerAuthProvider(refreshTokens: suspend RefreshTokensParams.() -> BearerTokens?, loadTokens: suspend () -> BearerTokens?, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean, realm: String?) : AuthProvider

An authentication provider for the Bearer HTTP authentication scheme. Bearer authentication involves security tokens called bearer tokens. As an example, these tokens can be used as a part of OAuth flow to authorize users of your application by using external providers, such as Google, Facebook, Twitter, and so on.

Link copied to clipboard
class BearerTokens(accessToken: String, refreshToken: String)
Link copied to clipboard
class DigestAuthConfig

A configuration for DigestAuthProvider.

Link copied to clipboard
class DigestAuthCredentials(username: String, password: String)

Contains credentials for DigestAuthProvider.

Link copied to clipboard
class DigestAuthProvider(credentials: suspend () -> DigestAuthCredentials?, realm: String?, algorithmName: String) : AuthProvider

An authentication provider for the Digest HTTP authentication scheme.

Link copied to clipboard
class RefreshTokensParams(client: HttpClient, response: HttpResponse, oldTokens: BearerTokens?)

Parameters to be passed to BearerAuthConfig.refreshTokens lambda.

Functions

Link copied to clipboard
fun Auth.basic(block: BasicAuthConfig.() -> Unit)

Installs the client's BasicAuthProvider.

Link copied to clipboard
fun Auth.bearer(block: BearerAuthConfig.() -> Unit)

Installs the client's BearerAuthProvider.

Link copied to clipboard
fun Auth.digest(block: DigestAuthConfig.() -> Unit)

Installs the client's DigestAuthProvider.