JWTCredential

class JWTCredential(payload: Payload) : JWTPayloadHolder, Credential

Represents a JWT credential consist of the specified payload

See also

com.auth0.jwt.interfaces.Payload

Parameters

payload

JWT

Constructors

Link copied to clipboard
fun JWTCredential(payload: Payload)

Functions

Link copied to clipboard
operator fun get(name: String): String?

Retrieve a non-RFC JWT string Claim by its name

Link copied to clipboard
fun <T : Any> getClaim(name: String, clazz: KClass<T>): T?

Retrieve a non-RFC JWT Claim by its name and attempt to decode as the supplied type

Link copied to clipboard
fun <T : Any> getListClaim(name: String, clazz: KClass<T>): List<T>

Retrieve a non-RFC JWT Claim by its name and attempt to decode as a list of the supplied type

Properties

Link copied to clipboard
val audience: List<String>

Get the value of the "aud" claim, or an empty list if it's not available.

Link copied to clipboard
val expiresAt: Date?

Get the value of the "exp" claim, or null if it's not available.

Link copied to clipboard
val issuedAt: Date?

Get the value of the "iat" claim, or null if it's not available.

Link copied to clipboard
val issuer: String?

Get the value of the "iss" claim, or null if it's not available.

Link copied to clipboard
val jwtId: String?

Get the value of the "jti" claim, or null if it's not available.

Link copied to clipboard
val notBefore: Date?

Get the value of the "nbf" claim, or null if it's not available.

Link copied to clipboard
val payload: Payload

The JWT payload

Link copied to clipboard
val subject: String?

Get the value of the "sub" claim, or null if it's not available.