Class FederationEntityMetadata
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.entities.FederationEntityMetadata
-
- All Implemented Interfaces:
net.minidev.json.JSONAware
public class FederationEntityMetadata extends Object implements net.minidev.json.JSONAware
Federation entity metadata.Related specifications:
- OpenID Connect Federation 1.0, section 3.6.
-
-
Constructor Summary
Constructors Constructor Description FederationEntityMetadata(URI federationEndpoint)Creates a new federation entity metadata.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getContacts()Gets the entity contacts.URIgetFederationAPIEndpointURI()Gets the federation API endpoint.URIgetHomepageURI()Gets the entity homepage URI.StringgetName()Gets the entity name.URIgetPolicyURI()Gets the conditions and policies documentation URI.EntityIDgetTrustAnchorID()Gets the trust anchor.List<com.nimbusds.jwt.SignedJWT>getTrustMarks()Gets the trust marks.static FederationEntityMetadataparse(String json)Parses a federation entity metadata from the specified JSON object string.static FederationEntityMetadataparse(net.minidev.json.JSONObject jsonObject)Parses a federation entity metadata from the specified a JSON object string.voidsetContacts(List<String> contacts)Sets the entity contacts.voidsetHomepageURI(URI homepageURI)Sets the entity homepage URI.voidsetName(String name)Sets the entity name.voidsetPolicyURI(URI policyURI)Sets the conditions and policies documentation URI.voidsetTrustAnchorID(EntityID trustAnchorID)Sets the trust anchor.voidsetTrustMarks(List<com.nimbusds.jwt.SignedJWT> trustMarks)Sets the trust marks.net.minidev.json.JSONObjecttoJSONObject()Returns a JSON object representation of this federation entity metadata.StringtoJSONString()
-
-
-
Constructor Detail
-
FederationEntityMetadata
public FederationEntityMetadata(URI federationEndpoint)
Creates a new federation entity metadata.- Parameters:
federationEndpoint- The federation API endpoint, required for trust anchors and intermediate entities, optional for leaf entities.
-
-
Method Detail
-
getFederationAPIEndpointURI
public URI getFederationAPIEndpointURI()
Gets the federation API endpoint.- Returns:
- The federation API endpoint,
nullif not specified.
-
getTrustAnchorID
public EntityID getTrustAnchorID()
Gets the trust anchor.- Returns:
- The trust anchor,
nullif not specified.
-
setTrustAnchorID
public void setTrustAnchorID(EntityID trustAnchorID)
Sets the trust anchor.- Parameters:
trustAnchorID- The trust anchor,nullif not specified.
-
getName
public String getName()
Gets the entity name.- Returns:
- The entity name,
nullif not specified.
-
setName
public void setName(String name)
Sets the entity name.- Parameters:
name- The entity name,nullif not specified.
-
getContacts
public List<String> getContacts()
Gets the entity contacts.- Returns:
- The contacts, such as names, e-mail addresses and phone
numbers,
nullif not specified.
-
setContacts
public void setContacts(List<String> contacts)
Sets the entity contacts.- Parameters:
contacts- The contacts, such as names, e-mail addresses and phone numbers,nullif not specified.
-
getPolicyURI
public URI getPolicyURI()
Gets the conditions and policies documentation URI.- Returns:
- The policy URI,
nullif not specified.
-
setPolicyURI
public void setPolicyURI(URI policyURI)
Sets the conditions and policies documentation URI.- Parameters:
policyURI- The policy URI,nullif not specified.
-
getHomepageURI
public URI getHomepageURI()
Gets the entity homepage URI.- Returns:
- The entity homepage URI,
nullif not specified.
-
setHomepageURI
public void setHomepageURI(URI homepageURI)
Sets the entity homepage URI.- Parameters:
homepageURI- The entity homepage URI,nullif not specified.
-
getTrustMarks
public List<com.nimbusds.jwt.SignedJWT> getTrustMarks()
Gets the trust marks.- Returns:
- The trust marks,
nullif not specified.
-
setTrustMarks
public void setTrustMarks(List<com.nimbusds.jwt.SignedJWT> trustMarks)
Sets the trust marks.- Parameters:
trustMarks- The trust marks,nullif not specified.
-
toJSONObject
public net.minidev.json.JSONObject 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
public String toJSONString()
- Specified by:
toJSONStringin 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
public static FederationEntityMetadata parse(String json) throws ParseException
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.
-
-