ktor-auth-jwt / io.ktor.auth.jwt / JWTPayloadHolder / getClaim

getClaim

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

Parameters

name - The claim's key as it appears in the JSON object

Return
the Claim's value or null if not available or unable to deserialise