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
public class TrustMarkClaimsSet extends CommonClaimsSet
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
Fields Modifier and Type Field Description static String
EXP_CLAIM_NAME
The expiration time claim name.static String
ID_CLAIM_NAME
The identifier claim name.static String
MARK_CLAIM_NAME
The mark claim name.static String
REF_CLAIM_NAME
The reference claim name.-
Fields inherited from class com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
IAT_CLAIM_NAME, SUB_CLAIM_NAME
-
Fields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME
-
-
Constructor Summary
Constructors Constructor Description TrustMarkClaimsSet(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getExpirationTime()
Gets the expiration time.Identifier
getID()
Returns the identifier.URI
getMark()
Gets the mark URI.URI
getReference()
Gets the reference URI.void
setExpirationTime(Date exp)
Sets the expiration time.void
setMark(URI markURI)
Sets the mark URI.void
setReference(URI refURI)
Sets the reference URI.void
validateRequiredClaimsPresence()
Validates 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, getSubject
-
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setIssuer, setURIClaim, setURLClaim, toJSONObject, toJSONString, toJWTClaimsSet
-
-
-
-
Field Detail
-
ID_CLAIM_NAME
public static final String ID_CLAIM_NAME
The identifier claim name.- See Also:
- Constant Field Values
-
MARK_CLAIM_NAME
public static final String MARK_CLAIM_NAME
The mark claim name.- See Also:
- Constant Field Values
-
EXP_CLAIM_NAME
public static final String EXP_CLAIM_NAME
The expiration time claim name.- See Also:
- Constant Field Values
-
REF_CLAIM_NAME
public static final String REF_CLAIM_NAME
The reference claim name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TrustMarkClaimsSet
public TrustMarkClaimsSet(Issuer iss, Subject sub, Identifier id, Date iat)
Creates a new trust mark claims set with the minimum required claims.- Parameters:
iss
- The issuer. Corresponds to theiss
claim. Must not benull
.sub
- The subject. Corresponds to thesub
claim. Must not benull
.id
- The identifier. Corresponds to theid
claim. Must not benull
.iat
- The issue time. Corresponds to theiat
claim. Must not benull
.
-
TrustMarkClaimsSet
public TrustMarkClaimsSet(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) throws ParseException
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 Detail
-
validateRequiredClaimsPresence
public void validateRequiredClaimsPresence() throws ParseException
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
public Identifier getID()
Returns the identifier. Corresponds to theid
claim.- Returns:
- The identifier.
-
getMark
public URI getMark()
Gets the mark URI. Corresponds to themark
claim.- Returns:
- The mark URI,
null
if not specified or parsing failed.
-
setMark
public void setMark(URI markURI)
Sets the mark URI. Corresponds to themark
claim.- Parameters:
markURI
- The mark URI,null
if not specified.
-
getExpirationTime
public Date getExpirationTime()
Gets the expiration time. Corresponds to theexp
claim.- Returns:
- The expiration time,
null
if not specified or parsing failed.
-
setExpirationTime
public void setExpirationTime(Date exp)
Sets the expiration time. Corresponds to theexp
claim.- Parameters:
exp
- The expiration time,null
if not specified.
-
getReference
public URI getReference()
Gets the reference URI. Corresponds to theref
claim.- Returns:
- The reference URI,
null
if not specified or parsing failed.
-
setReference
public void setReference(URI refURI)
Sets the reference URI. Corresponds to theref
claim.- Parameters:
refURI
- The reference URI,null
if not specified.
-
-