getClaimOrNull
inline fun <T> JwtPayload.getClaimOrNull(name: String, jsonInstance: Json = Jwt.defaultJsonParser): T?(source)
Returns the value of the named claim deserialized to type T, or null if the claim is absent.
Return
the claim value deserialized as T, or null if absent.
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)