Jwe

Represents a JWE (encrypted) token with five compact-serialization parts.

Properties

Link copied to clipboard
val aad: String

The Additional Authenticated Data (AAD) for this JWE token, which is the base64url-encoded header string used during encryption and decryption.

Link copied to clipboard

The base64url-encoded ciphertext produced by content encryption.

Link copied to clipboard

The base64url-encoded encrypted Content Encryption Key (CEK).

Link copied to clipboard
open override val header: JwtHeader

The JOSE header of the token.

Link copied to clipboard
val iv: String

The base64url-encoded initialization vector used during content encryption.

Link copied to clipboard
open override val payload: JwtPayload

The payload (claims set) of the token.

Link copied to clipboard
val tag: String

The base64url-encoded authentication tag produced by content encryption.

Functions

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

Returns the compact five-part JWE serialization: header.encryptedKey.iv.ciphertext.tag.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
inline fun <T> getHeader(jsonInstance: Json = Jwt.defaultJsonParser): T

Deserializes the token header as type T.

fun <T> getHeader(serializer: KSerializer<T>, jsonInstance: Json = Jwt.defaultJsonParser): T

Deserializes the token header using the given serializer.

Link copied to clipboard
inline fun <T> getPayload(jsonInstance: Json = Jwt.defaultJsonParser): T

Deserializes the token payload as type T.

fun <T> getPayload(serializer: KSerializer<T>, jsonInstance: Json = Jwt.defaultJsonParser): T

Deserializes the token payload using the given serializer.

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