Class EntityID
- 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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description EntityID(ClientID clientID)Creates a new entity identifier from the specified client identifier.EntityID(Issuer issuer)Creates a new entity identifier from the specified issuer identifier.EntityID(Subject subject)Creates a new entity identifier from the specified subject identifier.EntityID(String value)Creates a new entity identifier with the specified value.EntityID(URI value)Creates a new entity identifier from the specified URI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)static EntityIDparse(ClientID clientID)Parses an entity ID from the specified client ID.static EntityIDparse(Issuer issuer)Parses an entity ID from the specified issuer.static EntityIDparse(Subject subject)Parses an entity ID from the specified subject.static EntityIDparse(String value)Parses an entity ID from the specified string.ClientIDtoClientID()Returns the entity identifier as a client ID.IssuertoIssuer()Returns the entity identifier as an issuer.SubjecttoSubject()Returns the entity identifier as a subject.URItoURI()Returns the entity identifier as an URI.-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
-
-
-
Constructor Detail
-
EntityID
public EntityID(URI value)
Creates a new entity identifier from the specified URI.- Parameters:
value- The URI. Must not benull.- 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 benull.- 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 benull.- 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 benull.
-
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 benull.- Throws:
IllegalArgumentException- On a illegal entity ID.
-
-
Method Detail
-
toURI
public URI toURI()
Returns the entity identifier as an URI.- Returns:
- The entity identifier URI.
-
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:
equalsin classIdentifier
-
parse
public static EntityID parse(String value) throws ParseException
Parses an entity ID from the specified string.- Parameters:
value- The string value. Must not benull.- 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 benull.- 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 benull.- 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 benull.- Returns:
- The entity ID.
- Throws:
ParseException- On a illegal entity ID.
-
-