Class VerifiedClaimsConstraint
- java.lang.Object
-
- com.authlete.common.assurance.constraint.BaseConstraint
-
- com.authlete.common.assurance.constraint.VerifiedClaimsConstraint
-
- All Implemented Interfaces:
Constraint
public class VerifiedClaimsConstraint extends BaseConstraint
The class that represents the constraint forverified_claims
.- Since:
- 2.63
- See Also:
- OpenID Connect for Identity Assurance 1.0
-
-
Constructor Summary
Constructors Constructor Description VerifiedClaimsConstraint()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VerifiedClaimsConstraint
extract(Map<?,?> map, String key)
Create aVerifiedClaimsConstraint
instance from an object in the given map.ClaimsConstraint
getClaims()
Get the constraint forclaims
.VerificationConstraint
getVerification()
Get the constraint forverification
.boolean
isAllClaimsRequested()
Deprecated.void
setClaims(ClaimsConstraint constraint)
Set the constraint forclaims
.void
setVerification(VerificationConstraint constraint)
Set the constraint forverification
.Map<String,Object>
toMap()
Create aMap
instance that represents this object in the way conforming to the structure defined in 5.
-
-
-
Method Detail
-
getVerification
public VerificationConstraint getVerification()
Get the constraint forverification
.- Returns:
- The constraint for
verification
.
-
setVerification
public void setVerification(VerificationConstraint constraint)
Set the constraint forverification
.- Parameters:
constraint
- The constraint forverification
.
-
getClaims
public ClaimsConstraint getClaims()
Get the constraint forclaims
.- Returns:
- The constraint for
claims
.
-
setClaims
public void setClaims(ClaimsConstraint constraint)
Set the constraint forclaims
.- Parameters:
constraint
- The constraint forclaims
.
-
isAllClaimsRequested
@Deprecated public boolean isAllClaimsRequested()
Deprecated.Get the flag that indicates whetherverified_claims
requires all possible claims.When the value of the
"claims"
is null like below, it is "interpreted as a request for all possible Claims."{ "verified_claims": { "claims": null } }
This method returns
true
when"claims"
does not exist or the value of"claims"
is null.NOTE: In the Implementer's Draft 1 (ID1) of OpenID Connect for Identity Assurance 1.0,
"claims":null
has a special meaning. It is interpreted as "all possible claims". However, the special rule was removed from the ID2. Therefore, this method has been marked as deprecated.- Returns:
true
if the constraint indicates that all possible claims are required.
-
extract
public static VerifiedClaimsConstraint extract(Map<?,?> map, String key) throws ConstraintException
Create aVerifiedClaimsConstraint
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
VerifiedClaimsConstraint
instance that represents"verified_claims"
. Even if the map does not contain the given key, an instance ofVerifiedClaimsConstraint
is returned. - Throws:
ConstraintException
- The structure of the map does not conform to the specification (OpenID Connect for Identity Assurance 1.0).
-
toMap
public Map<String,Object> toMap()
Description copied from class:BaseConstraint
Create aMap
instance that represents this object in the way conforming to the structure defined in 5. Requesting Verified Claims of OpenID Connect for Identity Assurance 1.0.- Overrides:
toMap
in classBaseConstraint
- Returns:
- A
Map
instance that represents this object. IfBaseConstraint.exists()
returnsfalse
orBaseConstraint.isNull()
returnstrue
, this method returns null.
-
-