Package com.authlete.common.assurance
Class VerifiedClaims
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- com.authlete.common.assurance.VerifiedClaims
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class VerifiedClaims extends LinkedHashMap<String,Object>
The class that representsverified_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 VerifiedClaims()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VerifiedClaims
addClaim(String name, Object value)
Add a verified claim.boolean
containsClaims()
Check if this object contains"claims"
.boolean
containsVerification()
Check if this object contains"verification"
.static VerifiedClaims
extract(Map<?,?> map, String key)
Create aVerifiedClaims
instance from an object in the given map.Claims
getClaims()
Get the verified claims.Verification
getVerification()
Get information about the verification.Claims
removeClaims()
Remove"claims"
from this object.Verification
removeVerification()
Remove"verification"
from this object.VerifiedClaims
setClaims(Claims claims)
Set the verified claims.VerifiedClaims
setVerification(Verification verification)
Set information about the verification.-
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
-
getVerification
public Verification getVerification()
Get information about the verification.- Returns:
- The information about the verification.
-
setVerification
public VerifiedClaims setVerification(Verification verification)
Set information about the verification.- Parameters:
verification
- The information about the verification.- Returns:
this
object.
-
containsVerification
public boolean containsVerification()
Check if this object contains"verification"
.- Returns:
true
if this object contains"verification"
.
-
removeVerification
public Verification removeVerification()
Remove"verification"
from this object.- Returns:
- The old value that may have existed before removal.
-
getClaims
public Claims getClaims()
Get the verified claims.- Returns:
- The verified claims.
-
setClaims
public VerifiedClaims setClaims(Claims claims)
Set the verified claims.- Parameters:
claims
- The verified claims.- Returns:
this
object.
-
containsClaims
public boolean containsClaims()
Check if this object contains"claims"
.- Returns:
true
if this object contains"claims"
.
-
removeClaims
public Claims removeClaims()
Remove"claims"
from this object.- Returns:
- The old value that may have existed before removal.
-
addClaim
public VerifiedClaims addClaim(String name, Object value)
Add a verified claim.- Parameters:
name
- The name of the claim.value
- The value of the claim.- Returns:
this
object.
-
extract
public static VerifiedClaims extract(Map<?,?> map, String key) throws IdentityAssuranceException
Create aVerifiedClaims
instance from an object in the given map.- Parameters:
map
- A map that may contain"verified_claims"
.key
- The key that identifies the object in the map. In normal cases, the key is"verified_claims"
.- Returns:
- A
VerifiedClaims
instance that represents"verified_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).
-
-