Package-level declarations

Types

Link copied to clipboard

A configuration for BasicAuthProvider.

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

Contains credentials for BasicAuthProvider.

Link copied to clipboard
class BasicAuthProvider(credentials: suspend () -> BasicAuthCredentials?, realm: String? = null, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { false }) : 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

A configuration for BearerAuthProvider.

Link copied to clipboard
class BearerAuthProvider(refreshTokens: suspend RefreshTokensParams.() -> BearerTokens?, loadTokens: suspend () -> BearerTokens?, sendWithoutRequestCallback: (HttpRequestBuilder) -> Boolean = { true }, 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(val accessToken: String, val refreshToken: String)
Link copied to clipboard

A configuration for DigestAuthProvider.

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

Contains credentials for DigestAuthProvider.

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

An authentication provider for the Digest HTTP authentication scheme.

Link copied to clipboard
class RefreshTokensParams(val client: HttpClient, val response: HttpResponse, val 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.