Skip to content

BasicAuth

[Source]

Construct an HTTP Basic Authentication header value.

Returns a (name, value) tuple suitable for passing directly to Headers.set() or the request builder's header() method: ("authorization", "Basic <base64(username:password)>").

primitive val BasicAuth

Constructors

create

[Source]

new val create()
: BasicAuth val^

Returns


Public Functions

apply

[Source]

Build the Basic auth header from username and password.

The credentials are encoded as base64(username:password) per RFC 7617.

fun box apply(
  username: String val,
  password: String val)
: (String val , String val)

Parameters

Returns


eq

[Source]

fun box eq(
  that: BasicAuth val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: BasicAuth val)
: Bool val

Parameters

Returns