BasicAuth

class BasicAuth

HttpClient feature that sets an Authorization: basic header as specified in RFC-2617 using username and password.

https://www.ietf.org/rfc/rfc2617.txt

Types

Configuration

class Configuration

Feature

companion object Feature : 
    HttpClientFeature<Configuration, BasicAuth>

Constructors

<init>

BasicAuth(username: String, password: String)

HttpClient feature that sets an Authorization: basic header as specified in RFC-2617 using username and password.

Properties

password

val password: String

: user password.

username

val username: String

: user name.

Companion Object Properties

key

The AttributeKey for this feature.

Companion Object Functions

constructBasicAuthValue

fun constructBasicAuthValue(
    username: String,
    password: String
): String

Create basic auth header value from username and password.

install

fun install(feature: BasicAuth, scope: HttpClient): Unit

Installs the feature class for a HttpClient defined at scope.

prepare

fun prepare(block: Configuration.() -> Unit): BasicAuth

Builds a TFeature by calling the block with a TConfig config instance as receiver.