Package org.forgerock.oauth.clients.oidc
Class ClaimsMapper
java.lang.Object
org.forgerock.oauth.clients.oidc.ClaimsMapper
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asJsonString
(Claims claims) Returns the Claims as a json string.static JsonValue
asJsonValue
(Claims claims) Returns the Claims as a map with keys of id_token, userinfo, and any custom claims.static Claims
Parses incoming claims string.
-
Method Details
-
asJsonString
public static String asJsonString(Claims claims) throws com.fasterxml.jackson.core.JsonProcessingException Returns the Claims as a json string.- Parameters:
claims
- theClaims
object to convert- Returns:
- The Claims as a json string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- if the claims object does not represent valid JSON.
-
asJsonValue
Returns the Claims as a map with keys of id_token, userinfo, and any custom claims.- Parameters:
claims
- theClaims
object to convert- Returns:
- The Claims as a map
-
parse
Parses incoming claims string.- Parameters:
claims
- The claims string- Returns:
- The parsed Claims
- Throws:
JsonException
- If the claims string could not be parsed
-