java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.openid.connect.sdk.federation.entities.EntityID
All Implemented Interfaces:
Serializable, Comparable<Identifier>, net.minidev.json.JSONAware

@Immutable public final class EntityID extends Identifier
Federation entity identifier.

Related specifications:

  • OpenID Connect Federation 1.0, section 1.2.
See Also:
  • Constructor Details

    • EntityID

      public EntityID(URI value)
      Creates a new entity identifier from the specified URI.
      Parameters:
      value - The URI. Must not be null.
      Throws:
      IllegalArgumentException - On a illegal entity ID.
    • EntityID

      public EntityID(Issuer issuer)
      Creates a new entity identifier from the specified issuer identifier.
      Parameters:
      issuer - The issuer. Must represent an URI and must not be null.
      Throws:
      IllegalArgumentException - On a illegal entity ID.
    • EntityID

      public EntityID(Subject subject)
      Creates a new entity identifier from the specified subject identifier.
      Parameters:
      subject - The subject. Must represent an URI and must not be null.
      Throws:
      IllegalArgumentException - On a illegal entity ID.
    • EntityID

      public EntityID(ClientID clientID)
      Creates a new entity identifier from the specified client identifier.
      Parameters:
      clientID - The client ID. Must represent an URI and must not be null.
    • EntityID

      public EntityID(String value)
      Creates a new entity identifier with the specified value.
      Parameters:
      value - The identifier value. Must represent an URI and must not be null.
      Throws:
      IllegalArgumentException - On a illegal entity ID.
  • Method Details

    • toURI

      public URI toURI()
      Returns the entity identifier as an URI.
      Returns:
      The entity identifier URI.
    • toIssuer

      public Issuer toIssuer()
      Returns the entity identifier as an issuer.
      Returns:
      The issuer.
    • toSubject

      public Subject toSubject()
      Returns the entity identifier as a subject.
      Returns:
      The subject.
    • toClientID

      public ClientID toClientID()
      Returns the entity identifier as a client ID.
      Returns:
      The client ID.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Identifier
    • parse

      public static EntityID parse(String value) throws ParseException
      Parses an entity ID from the specified string.
      Parameters:
      value - The string value. Must not be null.
      Returns:
      The entity ID.
      Throws:
      ParseException - On a illegal entity ID.
    • parse

      public static EntityID parse(Issuer issuer) throws ParseException
      Parses an entity ID from the specified issuer.
      Parameters:
      issuer - The issuer. Must not be null.
      Returns:
      The entity ID.
      Throws:
      ParseException - On a illegal entity ID.
    • parse

      public static EntityID parse(Subject subject) throws ParseException
      Parses an entity ID from the specified subject.
      Parameters:
      subject - The subject. Must not be null.
      Returns:
      The entity ID.
      Throws:
      ParseException - On a illegal entity ID.
    • parse

      public static EntityID parse(ClientID clientID) throws ParseException
      Parses an entity ID from the specified client ID.
      Parameters:
      clientID - The client ID. Must not be null.
      Returns:
      The entity ID.
      Throws:
      ParseException - On a illegal entity ID.