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 5.3.
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXP_CLAIM_NAMEThe expiration time claim name.static StringID_CLAIM_NAMEThe identifier claim name.static StringLOGO_URI_CLAIM_NAMEThe mark / logo URI name.static StringREF_CLAIM_NAMEThe 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 DategetExpirationTime()Gets the expiration time.IdentifiergetID()Returns the identifier.URIgetLogoURI()Gets the mark / logo URI.URIgetReference()Gets the reference URI.voidsetExpirationTime(Date exp)Sets the expiration time.voidsetMark(URI markURI)Sets the mark / logo URI.voidsetReference(URI refURI)Sets the reference URI.voidvalidateRequiredClaimsPresence()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
equals, getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONArrayClaim, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, hashCode, 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
-
LOGO_URI_CLAIM_NAME
public static final String LOGO_URI_CLAIM_NAME
The mark / logo URI 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 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
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 theidclaim.- Returns:
- The identifier.
-
getLogoURI
public URI getLogoURI()
Gets the mark / logo URI. Corresponds to thelogo_uriclaim.- Returns:
- The mark / logo URI,
nullif not specified or parsing failed.
-
setMark
public void setMark(URI markURI)
Sets the mark / logo URI. Corresponds to thelogo_uriclaim.- Parameters:
markURI- The mark / logo URI,nullif not specified.
-
getExpirationTime
public Date getExpirationTime()
Gets the expiration time. Corresponds to theexpclaim.- Returns:
- The expiration time,
nullif not specified or parsing failed.
-
setExpirationTime
public void setExpirationTime(Date exp)
Sets the expiration time. Corresponds to theexpclaim.- Parameters:
exp- The expiration time,nullif not specified.
-
getReference
public URI getReference()
Gets the reference URI. Corresponds to therefclaim.- Returns:
- The reference URI,
nullif not specified or parsing failed.
-
setReference
public void setReference(URI refURI)
Sets the reference URI. Corresponds to therefclaim.- Parameters:
refURI- The reference URI,nullif not specified.
-
-