Package com.authlete.common.assurance
Class Claims
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- com.authlete.common.assurance.Claims
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class Claims extends LinkedHashMap<String,Object>
The class that representsverified_claims/claims
.- Since:
- 2.63
- See Also:
- OpenID Connect for Identity Assurance 1.0, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description Claims()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Claims
extract(Map<?,?> map, String key)
Create aClaims
instance from an object in the given map.Claims
putClaim(String claimName, Object claimValue)
Put a claim to this object.-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
putClaim
public Claims putClaim(String claimName, Object claimValue)
Put a claim to this object.This method internally calls
put(String, Object)
method to register the given pair of claim name and claim value and then returnsthis
object.- Parameters:
claimName
- The claim name.claimValue
- The claim value.- Returns:
this
object.- Since:
- 2.65
-
extract
public static Claims extract(Map<?,?> map, String key) throws IdentityAssuranceException
Create aClaims
instance from an object in the given map.- Parameters:
map
- A map that may contain"claims"
.key
- The key that identifies the object in the map. In normal cases, the key is"claims"
.- Returns:
- A
Claims
instance that represents"claims"
. If the map does not contain the given key, null is returned. - Throws:
IdentityAssuranceException
- The structure of the map does not conform to the specification (OpenID Connect for Identity Assurance 1.0).
-
-