Parameterized

class Parameterized(authScheme: String, parameters: List<HeaderValueParam>, encoding: HeaderValueEncoding) : HttpAuthHeader

Describes a parameterized authentication header that is represented by a set of parameters encoded with encoding.

Constructors

Link copied to clipboard
fun Parameterized(authScheme: String, parameters: Map<String, String>, encoding: HeaderValueEncoding = HeaderValueEncoding.QUOTED_WHEN_REQUIRED)
Link copied to clipboard
fun Parameterized(authScheme: String, parameters: List<HeaderValueParam>, encoding: HeaderValueEncoding = HeaderValueEncoding.QUOTED_WHEN_REQUIRED)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun parameter(name: String): String?

Tries to extract the first value of a parameter name. Returns null when not found.

Link copied to clipboard
open override fun render(): String

Encodes the header with the default HeaderValueEncoding for this header.

open override fun render(encoding: HeaderValueEncoding): String

Encodes the header with a specified encoding.

Link copied to clipboard
open override fun toString(): String

Encodes the header with the default HeaderValueEncoding for this header.

Link copied to clipboard
fun withParameter(name: String, value: String): HttpAuthHeader.Parameterized

Copies this Parameterized appending a new parameter name.

Link copied to clipboard
fun withReplacedParameter(name: String, value: String): HttpAuthHeader.Parameterized

Copies this Parameterized replacing parameters with name assigning new value or appending if no such parameters found. If there were several pairs they will be reduced into a single pair at position of first occurrence discarding following pairs with this name.

Properties

Link copied to clipboard
val authScheme: String

auth scheme, usually one of AuthScheme

Link copied to clipboard
val encoding: HeaderValueEncoding

parameters encoding method, one of HeaderValueEncoding

Link copied to clipboard
val parameters: List<HeaderValueParam>

a list of auth parameters