Class FederationEntityMetadata
java.lang.Object
com.nimbusds.openid.connect.sdk.federation.entities.FederationEntityMetadata
- All Implemented Interfaces:
net.minidev.json.JSONAware
Federation entity metadata.
Related specifications:
- OpenID Connect Federation 1.0, section 3.6.
-
Constructor Summary
ConstructorsConstructorDescriptionFederationEntityMetadata
(URI federationEndpoint) Creates a new federation entity metadata. -
Method Summary
Modifier and TypeMethodDescriptionGets the entity contacts.Gets the federation API endpoint.Gets the entity homepage URI.getName()
Gets the entity name.Gets the conditions and policies documentation URI.Gets the trust anchor.List<com.nimbusds.jwt.SignedJWT>
Gets the trust marks.static FederationEntityMetadata
Parses a federation entity metadata from the specified JSON object string.static FederationEntityMetadata
parse
(net.minidev.json.JSONObject jsonObject) Parses a federation entity metadata from the specified a JSON object string.void
setContacts
(List<String> contacts) Sets the entity contacts.void
setHomepageURI
(URI homepageURI) Sets the entity homepage URI.void
Sets the entity name.void
setPolicyURI
(URI policyURI) Sets the conditions and policies documentation URI.void
setTrustAnchorID
(EntityID trustAnchorID) Sets the trust anchor.void
setTrustMarks
(List<com.nimbusds.jwt.SignedJWT> trustMarks) Sets the trust marks.net.minidev.json.JSONObject
Returns a JSON object representation of this federation entity metadata.
-
Constructor Details
-
FederationEntityMetadata
Creates a new federation entity metadata.- Parameters:
federationEndpoint
- The federation API endpoint, required for trust anchors and intermediate entities, optional for leaf entities.
-
-
Method Details
-
getFederationAPIEndpointURI
Gets the federation API endpoint.- Returns:
- The federation API endpoint,
null
if not specified.
-
getTrustAnchorID
Gets the trust anchor.- Returns:
- The trust anchor,
null
if not specified.
-
setTrustAnchorID
Sets the trust anchor.- Parameters:
trustAnchorID
- The trust anchor,null
if not specified.
-
getName
Gets the entity name.- Returns:
- The entity name,
null
if not specified.
-
setName
Sets the entity name.- Parameters:
name
- The entity name,null
if not specified.
-
getContacts
Gets the entity contacts.- Returns:
- The contacts, such as names, e-mail addresses and phone
numbers,
null
if not specified.
-
setContacts
Sets the entity contacts.- Parameters:
contacts
- The contacts, such as names, e-mail addresses and phone numbers,null
if not specified.
-
getPolicyURI
Gets the conditions and policies documentation URI.- Returns:
- The policy URI,
null
if not specified.
-
setPolicyURI
Sets the conditions and policies documentation URI.- Parameters:
policyURI
- The policy URI,null
if not specified.
-
getHomepageURI
Gets the entity homepage URI.- Returns:
- The entity homepage URI,
null
if not specified.
-
setHomepageURI
Sets the entity homepage URI.- Parameters:
homepageURI
- The entity homepage URI,null
if not specified.
-
getTrustMarks
Gets the trust marks.- Returns:
- The trust marks,
null
if not specified.
-
setTrustMarks
Sets the trust marks.- Parameters:
trustMarks
- The trust marks,null
if not specified.
-
toJSONObject
Returns a JSON object representation of this federation entity metadata.Example:
{ "federation_api_endpoint" : "https://example.com/federation_api_endpoint", "name" : "The example cooperation", "homepage_uri" : "https://www.example.com" }
- Returns:
- The JSON object.
-
toJSONString
- Specified by:
toJSONString
in interfacenet.minidev.json.JSONAware
-
parse
public static FederationEntityMetadata parse(net.minidev.json.JSONObject jsonObject) throws ParseException Parses a federation entity metadata from the specified a JSON object string.Example:
{ "federation_api_endpoint" : "https://example.com/federation_api_endpoint", "name" : "The example cooperation", "homepage_uri" : "https://www.example.com" }
- Parameters:
jsonObject
- The JSON object. Must not benull
.- Returns:
- The entity metadata.
- Throws:
ParseException
- If parsing failed.
-
parse
Parses a federation entity metadata from the specified JSON object string.Example:
{ "federation_api_endpoint" : "https://example.com/federation_api_endpoint", "name" : "The example cooperation", "homepage_uri" : "https://www.example.com" }
- Parameters:
json
- The JSON object string. Must not benull
.- Returns:
- The entity metadata.
- Throws:
ParseException
- If parsing failed.
-