Class CommonFederationClaimsSet
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.ClaimsSet
-
- com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
-
- com.nimbusds.openid.connect.sdk.federation.entities.CommonFederationClaimsSet
-
- All Implemented Interfaces:
net.minidev.json.JSONAware
- Direct Known Subclasses:
EntityStatementClaimsSet
,ResolveClaimsSet
public abstract class CommonFederationClaimsSet extends CommonClaimsSet
Common federation claims set.
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXP_CLAIM_NAME
The expiration time claim name.static String
METADATA_CLAIM_NAME
The metadata claim name.static String
TRUST_MARKS_CLAIM_NAME
The trust marks 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 Modifier Constructor Description protected
CommonFederationClaimsSet()
Creates a new empty common federation claims set.protected
CommonFederationClaimsSet(net.minidev.json.JSONObject jsonObject)
Creates a new common federation claims set from the specified JSON object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationServerMetadata
getASMetadata()
Gets the OAuth 2.0 authorisation server metadata if present for this entity.Date
getExpirationTime()
Gets the entity statement expiration time.FederationEntityMetadata
getFederationEntityMetadata()
Gets the federation entity metadata if present for this entity.EntityID
getIssuerEntityID()
Returns the issuer as entity ID.net.minidev.json.JSONObject
getMetadata(EntityType type)
Gets the metadata for the specified entity type.ClientMetadata
getOAuthClientMetadata()
Gets the OAuth 2.0 client metadata if present for this entity.OIDCProviderMetadata
getOPMetadata()
Gets the OpenID provider metadata if present for this entity.OIDCClientMetadata
getRPMetadata()
Gets the OpenID relying party metadata if present for this entity.EntityID
getSubjectEntityID()
Returns the subject as entity ID.TrustMarkIssuerMetadata
getTrustMarkIssuerMetadata()
Gets the trust mark issuer metadata if present for this entity.List<TrustMarkEntry>
getTrustMarks()
Gets the trust marks.void
setTrustMarks(List<TrustMarkEntry> marks)
Sets the trust marks.protected void
validateRequiredClaimsPresence()
Validates this claims set for having all minimum required claims.-
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
-
EXP_CLAIM_NAME
public static final String EXP_CLAIM_NAME
The expiration time claim name.- See Also:
- Constant Field Values
-
METADATA_CLAIM_NAME
public static final String METADATA_CLAIM_NAME
The metadata claim name.- See Also:
- Constant Field Values
-
TRUST_MARKS_CLAIM_NAME
public static final String TRUST_MARKS_CLAIM_NAME
The trust marks claim name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CommonFederationClaimsSet
protected CommonFederationClaimsSet()
Creates a new empty common federation claims set.
-
CommonFederationClaimsSet
protected CommonFederationClaimsSet(net.minidev.json.JSONObject jsonObject)
Creates a new common federation claims set from the specified JSON object.- Parameters:
jsonObject
- The JSON object. Must not benull
.
-
-
Method Detail
-
validateRequiredClaimsPresence
protected void validateRequiredClaimsPresence() throws ParseException
Validates this claims set for having all minimum required claims.- Throws:
ParseException
- If the validation failed and a required claim is missing.
-
getIssuerEntityID
public EntityID getIssuerEntityID()
Returns the issuer as entity ID. Corresponds to theiss
claim.- Returns:
- The issuer as entity ID.
-
getSubjectEntityID
public EntityID getSubjectEntityID()
Returns the subject as entity ID. Corresponds to theiss
claim.- Returns:
- The subject as entity ID.
-
getExpirationTime
public Date getExpirationTime()
Gets the entity statement expiration time. Corresponds to theexp
claim.- Returns:
- The expiration time,
null
if not specified or parsing failed.
-
getMetadata
public net.minidev.json.JSONObject getMetadata(EntityType type)
Gets the metadata for the specified entity type. Use a typed getter, such asgetRPMetadata()
, when available. Corresponds to themetadata
claim.- Parameters:
type
- The entity type. Must not benull
.- Returns:
- The metadata,
null
if not specified or if parsing failed.
-
getRPMetadata
public OIDCClientMetadata getRPMetadata()
Gets the OpenID relying party metadata if present for this entity. Corresponds to themetadata.openid_relying_party
claim.- Returns:
- The RP metadata,
null
if not specified or if parsing failed.
-
getOPMetadata
public OIDCProviderMetadata getOPMetadata()
Gets the OpenID provider metadata if present for this entity. Corresponds to themetadata.openid_provider
claim.- Returns:
- The OP metadata,
null
if not specified or if parsing failed.
-
getOAuthClientMetadata
public ClientMetadata getOAuthClientMetadata()
Gets the OAuth 2.0 client metadata if present for this entity. Corresponds to themetadata.oauth_client
claim.- Returns:
- The client metadata,
null
if not specified or if parsing failed.
-
getASMetadata
public AuthorizationServerMetadata getASMetadata()
Gets the OAuth 2.0 authorisation server metadata if present for this entity. Corresponds to themetadata.oauth_authorization_server
claim.- Returns:
- The AS metadata,
null
if not specified or if parsing failed.
-
getFederationEntityMetadata
public FederationEntityMetadata getFederationEntityMetadata()
Gets the federation entity metadata if present for this entity. Corresponds to themetadata.federation_entity
claim.- Returns:
- The federation entity metadata,
null
if not specified or if parsing failed.
-
getTrustMarkIssuerMetadata
public TrustMarkIssuerMetadata getTrustMarkIssuerMetadata()
Gets the trust mark issuer metadata if present for this entity. Corresponds to themetadata.trust_mark_issuer
claim.- Returns:
- The trust mark issuer metadata,
null
if not specified or if parsing failed.
-
getTrustMarks
public List<TrustMarkEntry> getTrustMarks()
Gets the trust marks. Corresponds to thetrust_marks
claim.- Returns:
- The trust marks,
null
if not specified or parsing failed.
-
setTrustMarks
public void setTrustMarks(List<TrustMarkEntry> marks)
Sets the trust marks. Corresponds to thetrust_marks
claim.- Parameters:
marks
- The trust marks,null
if not specified.
-
-