WebTokenClaim

abstract class WebTokenClaim<T : Any>(val kType: KClass<T>, val strKey: String, val numKey: Long? = null, val header: Boolean = false)

Helper object to represent a web token (CWT or JWT) claim.

Most of the claims go to the body of the web token, but some must be in the header. In JWT all claims use string keys, but in CWT some use numeric keys.

Parameters

kType

value type for the claim

strKey

string key for the claim

numKey

numeric key for the claim (in any)

header

true if the claim must be in the header

Inheritors

Constructors

Link copied to clipboard
constructor(kType: KClass<T>, strKey: String, numKey: Long? = null, header: Boolean = false)

Types

Link copied to clipboard

Authorization token (ath) claim.

Link copied to clipboard

Audience (aud) claim.

Link copied to clipboard

Challenge (challenge) claim.

Link copied to clipboard
object Companion
Link copied to clipboard
object Cti : WebTokenClaim<ByteString>

CWT identifier (cti) claim.

Link copied to clipboard

Expiration (exp) claim.

Link copied to clipboard

HTTP method (htm) claim.

Link copied to clipboard

HTTP url (htu) claim.

Link copied to clipboard

Issued-at (iat) claim.

Link copied to clipboard

Issuer (iss) claim.

Link copied to clipboard

JWT identifier (jti) claim.

Link copied to clipboard

Not-before (nbf) claim.

Link copied to clipboard

Nonce (nonce) claim.

Link copied to clipboard

Subject (sub) claim.

Link copied to clipboard

Token type (typ) claim.

Properties

Link copied to clipboard
val header: Boolean = false
Link copied to clipboard
val kType: KClass<T>
Link copied to clipboard
val numKey: Long? = null
Link copied to clipboard