Package org.forgerock.oauth.clients.oidc
Class ClaimsMapper
java.lang.Object
org.forgerock.oauth.clients.oidc.ClaimsMapper
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringasJsonString(Claims claims) Returns the Claims as a json string.static JsonValueasJsonValue(Claims claims) Returns the Claims as a map with keys of id_token, userinfo, and any custom claims.static ClaimsParses 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- theClaimsobject 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- theClaimsobject 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
-