DecodedJwt

interface DecodedJwt

A library-agnostic view of a successfully verified JWT.

Adapter modules populate this via SimpleDecodedJwt after verification. Standard string claims absent from the token are absent from claims; callers should treat missing optional claims as absent rather than distinguishing null.

Inheritors

Properties

Link copied to clipboard
abstract val claims: Map<String, Any?>

All claims from the token payload. Values may be strings, numbers, booleans, lists, or maps.

Link copied to clipboard
abstract val subject: String

The sub (subject) claim. Blank string when the token carried no sub claim.

Functions

Link copied to clipboard
open fun <T> claim(name: String): T?

Returns the claim value cast to T, or null when the claim is absent or not of the expected type.