Class TrustMarkClaimsSet
java.lang.Object
com.nimbusds.openid.connect.sdk.claims.ClaimsSet
com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
com.nimbusds.openid.connect.sdk.federation.trust.marks.TrustMarkClaimsSet
- All Implemented Interfaces:
net.minidev.json.JSONAware
Federation trust mark claims set, serialisable to a JSON object.
Example claims set:
{
"iss" : "https://swamid.sunet.se",
"sub" : "https://umu.se/op",
"iat" : 1577833200,
"exp" : 1609369200,
"id" : "https://refeds.org/wp-content/uploads/2016/01/Sirtfi-1.0.pdf"
}
Related specifications:
- OpenID Connect Federation 1.0, section 4.3.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe expiration time claim name.static final StringThe identifier claim name.static final StringThe mark claim name.static final StringThe reference claim name.Fields inherited from class com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
IAT_CLAIM_NAME, SUB_CLAIM_NAMEFields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME -
Constructor Summary
ConstructorsConstructorDescriptionTrustMarkClaimsSet(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Creates a new trust mark claims set from the specified JWT claims set.TrustMarkClaimsSet(Issuer iss, Subject sub, Identifier id, Date iat) Creates a new trust mark claims set with the minimum required claims. -
Method Summary
Modifier and TypeMethodDescriptionGets the expiration time.getID()Returns the identifier.getMark()Gets the mark URI.Gets the reference URI.voidsetExpirationTime(Date exp) Sets the expiration time.voidSets the mark URI.voidsetReference(URI refURI) Sets the reference URI.voidValidates this claims set for having all minimum required claims for a trust mark.Methods inherited from class com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
getIssueTime, getStandardClaimNames, getSubjectMethods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
equals, getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, hashCode, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setIssuer, setURIClaim, setURLClaim, toJSONObject, toJSONString, toJWTClaimsSet
-
Field Details
-
ID_CLAIM_NAME
The identifier claim name.- See Also:
-
MARK_CLAIM_NAME
The mark claim name.- See Also:
-
EXP_CLAIM_NAME
The expiration time claim name.- See Also:
-
REF_CLAIM_NAME
The reference claim name.- See Also:
-
-
Constructor Details
-
TrustMarkClaimsSet
Creates a new trust mark claims set with the minimum required claims.- Parameters:
iss- The issuer. Corresponds to theissclaim. Must not benull.sub- The subject. Corresponds to thesubclaim. Must not benull.id- The identifier. Corresponds to theidclaim. Must not benull.iat- The issue time. Corresponds to theiatclaim. Must not benull.
-
TrustMarkClaimsSet
Creates a new trust mark claims set from the specified JWT claims set.- Parameters:
jwtClaimsSet- The JWT claims set. Must not benull.- Throws:
ParseException- If the JWT claims set doesn't represent a valid trust mark claims set.
-
-
Method Details
-
validateRequiredClaimsPresence
Validates this claims set for having all minimum required claims for a trust mark.- Throws:
ParseException- If the validation failed and a required claim is missing.
-
getID
Returns the identifier. Corresponds to theidclaim.- Returns:
- The identifier.
-
getMark
Gets the mark URI. Corresponds to themarkclaim.- Returns:
- The mark URI,
nullif not specified or parsing failed.
-
setMark
Sets the mark URI. Corresponds to themarkclaim.- Parameters:
markURI- The mark URI,nullif not specified.
-
getExpirationTime
Gets the expiration time. Corresponds to theexpclaim.- Returns:
- The expiration time,
nullif not specified or parsing failed.
-
setExpirationTime
Sets the expiration time. Corresponds to theexpclaim.- Parameters:
exp- The expiration time,nullif not specified.
-
getReference
Gets the reference URI. Corresponds to therefclaim.- Returns:
- The reference URI,
nullif not specified or parsing failed.
-
setReference
Sets the reference URI. Corresponds to therefclaim.- Parameters:
refURI- The reference URI,nullif not specified.
-