ktor-client-auth / io.ktor.client.features.auth.providers / BasicAuthConfig

BasicAuthConfig

class BasicAuthConfig

BasicAuthProvider configuration.

Constructors

<init>

BasicAuthConfig()

BasicAuthProvider configuration.

Properties

password

lateinit var password: String

Required: The password of the basic auth.

realm

var realm: String?

Optional: current provider realm

sendWithoutRequest

var sendWithoutRequest: Boolean

Send credentials in without waiting for HttpStatusCode.Unauthorized.

username

lateinit var username: String

Required: The username of the basic auth.

Functions

credentials

fun credentials(block: suspend () -> BasicAuthCredentials?): Unit

Required: Credentials provider.

sendWithoutRequest

fun sendWithoutRequest(block: (HttpRequestBuilder) -> Boolean): Unit

Send credentials in without waiting for HttpStatusCode.Unauthorized.