CborWebToken

@Serializable
data class CborWebToken(val issuer: String? = null, val subject: String? = null, val audience: String? = null, val expiration: Instant? = null, val notBefore: Instant? = null, val issuedAt: Instant? = null, val cwtId: ByteArray? = null, val nonce: ByteArray? = null)(source)

CBOR Web Token (CWT)

See RFC8392

Constructors

Link copied to clipboard
constructor(issuer: String? = null, subject: String? = null, audience: String? = null, expiration: Instant? = null, notBefore: Instant? = null, issuedAt: Instant? = null, cwtId: ByteArray? = null, nonce: ByteArray? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "aud")
val audience: String? = null

The "aud" (audience) claim has the same meaning and processing rules as the "aud" claim defined in Section 4.1.3 of RFC7519, except that the value of the audience claim is a StringOrURI when it is not an array or each of the audience array element values is a StringOrURI when the audience claim value is an array. (StringOrURI is defined in Section 2 of this specification.) The Claim Key 3 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "jti")
val cwtId: ByteArray? = null

The "cti" (CWT ID) claim has the same meaning and processing rules as the "jti" claim defined in Section 4.1.7 of RFC7519, except that the value is a byte string. The Claim Key 7 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "exp")
@Serializable(with = InstantLongSerializer::class)
val expiration: Instant? = null

The "exp" (expiration time) claim has the same meaning and processing rules as the "exp" claim defined in Section 4.1.4 of RFC7519, except that the value is a NumericDate, as defined in Section 2 of this specification. The Claim Key 4 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "iat")
@Serializable(with = InstantLongSerializer::class)
val issuedAt: Instant? = null

The "iat" (issued at) claim has the same meaning and processing rules as the "iat" claim defined in Section 4.1.6 of RFC7519, except that the value is a NumericDate, as defined in Section 2 of this specification. The Claim Key 6 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "iss")
val issuer: String? = null

The "iss" (issuer) claim has the same meaning and processing rules as the "iss" claim defined in Section 4.1.1 of RFC7519, except that the value is a StringOrURI, as defined in Section 2 of this specification. The Claim Key 1 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "Nonce")
val nonce: ByteArray? = null
Link copied to clipboard
@SerialName(value = "nbf")
@Serializable(with = InstantLongSerializer::class)
val notBefore: Instant? = null

The "nbf" (not before) claim has the same meaning and processing rules as the "nbf" claim defined in Section 4.1.5 of RFC7519, except that the value is a NumericDate, as defined in Section 2 of this specification. The Claim Key 5 is used to identify this claim.

Link copied to clipboard
@SerialName(value = "sub")
val subject: String? = null

The "sub" (subject) claim has the same meaning and processing rules as the "sub" claim defined in Section 4.1.2 of RFC7519, except that the value is a StringOrURI, as defined in Section 2 of this specification. The Claim Key 2 is used to identify this claim.

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
Link copied to clipboard
open override fun toString(): String