Package org.forgerock.oauth.clients.oidc
Class ClaimsMapper
- java.lang.Object
-
- org.forgerock.oauth.clients.oidc.ClaimsMapper
-
public final class ClaimsMapper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
parse(String claims)
Parses incoming claims string.
-
-
-
Method Detail
-
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
public static JsonValue asJsonValue(Claims claims)
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
public static Claims parse(String claims) throws JsonException
Parses incoming claims string.- Parameters:
claims
- The claims string- Returns:
- The parsed Claims
- Throws:
JsonException
- If the claims string could not be parsed
-
-