Class 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 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, null if not specified.
      • getTrustAnchorID

        public EntityID getTrustAnchorID()
        Gets the trust anchor.
        Returns:
        The trust anchor, null if not specified.
      • setTrustAnchorID

        public void setTrustAnchorID​(EntityID trustAnchorID)
        Sets the trust anchor.
        Parameters:
        trustAnchorID - The trust anchor, null if not specified.
      • getName

        public String getName()
        Gets the entity name.
        Returns:
        The entity name, null if not specified.
      • setName

        public void setName​(String name)
        Sets the entity name.
        Parameters:
        name - The entity name, null if not specified.
      • getContacts

        public List<StringgetContacts()
        Gets the entity contacts.
        Returns:
        The contacts, such as names, e-mail addresses and phone numbers, null if 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, null if not specified.
      • getPolicyURI

        public URI getPolicyURI()
        Gets the conditions and policies documentation URI.
        Returns:
        The policy URI, null if not specified.
      • setPolicyURI

        public void setPolicyURI​(URI policyURI)
        Sets the conditions and policies documentation URI.
        Parameters:
        policyURI - The policy URI, null if not specified.
      • getHomepageURI

        public URI getHomepageURI()
        Gets the entity homepage URI.
        Returns:
        The entity homepage URI, null if not specified.
      • setHomepageURI

        public void setHomepageURI​(URI homepageURI)
        Sets the entity homepage URI.
        Parameters:
        homepageURI - The entity homepage URI, null if not specified.
      • getTrustMarks

        public List<com.nimbusds.jwt.SignedJWT> getTrustMarks()
        Gets the trust marks.
        Returns:
        The trust marks, null if not specified.
      • setTrustMarks

        public void setTrustMarks​(List<com.nimbusds.jwt.SignedJWT> trustMarks)
        Sets the trust marks.
        Parameters:
        trustMarks - The trust marks, null if 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:
        toJSONString in interface net.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 be null.
        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 be null.
        Returns:
        The entity metadata.
        Throws:
        ParseException - If parsing failed.