Jws

Represents a JWS (signed) token with one or more signatures.

Types

Link copied to clipboard
class Signature(val header: JwtHeader, val signature: String)

Represents a single signature entry within a JWS token.

Properties

Link copied to clipboard
open override val header: JwtHeader

The JOSE header of the token.

Link copied to clipboard
open override val payload: JwtPayload

The payload (claims set) of the token.

Link copied to clipboard

The signature string for this token, taken from the first entry in signatures.

Link copied to clipboard

The list of Signature entries; each holds a header and its corresponding base64url-encoded signature.

Functions

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

Returns the compact three-part JWS serialization: header.payload.signature.

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