getClaim
inline fun <T> JwtPayload.getClaim(name: String, jsonInstance: Json = Jwt.defaultJsonParser): T(source)
Returns the value of the named claim, deserializing it to type T using a reified serializer.
Return
the claim value deserialized as T.
Parameters
name
the name of the claim to retrieve.
jsonInstance
the Json instance to use for deserialization; defaults to the library's Jwt.defaultJsonParser configuration (ignoreUnknownKeys = true, explicitNulls = false)
See also
Throws
if the claim is absent.