Package com.nimbusds.oauth2.sdk.id
Class Issuer
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.id.Identifier
-
- com.nimbusds.oauth2.sdk.id.Issuer
-
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
@Immutable public final class Issuer extends Identifier
Issuer identifier.Valid issuer identifiers are URIs with "https" schema and no query or fragment component.
- 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 Issuer(Identifier value)
Creates a new issuer identifier with the specified value.Issuer(String value)
Creates a new issuer identifier with the specified value.Issuer(URI value)
Creates a new issuer identifier with the specified URI value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
boolean
isValid()
Checks if this issuer is a valid identifier.static boolean
isValid(Issuer value)
Checks if the specified issuer is a valid identifier.static boolean
isValid(String value)
Checks if the specified string represents a valid issuer identifier.static boolean
isValid(URI value)
Checks if the specified URI represents a valid issuer identifier.static Issuer
parse(String s)
Parses an issuer from the specified string.-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
-
-
-
Constructor Detail
-
Issuer
public Issuer(String value)
Creates a new issuer identifier with the specified value.- Parameters:
value
- The issuer identifier value. Must not benull
or empty string.
-
Issuer
public Issuer(URI value)
Creates a new issuer identifier with the specified URI value.- Parameters:
value
- The URI value. Must not benull
.
-
Issuer
public Issuer(Identifier value)
Creates a new issuer identifier with the specified value.- Parameters:
value
- The value. Must not benull
.
-
-
Method Detail
-
isValid
public static boolean isValid(String value)
Checks if the specified string represents a valid issuer identifier. This method isnull
-safe.- Parameters:
value
- The issuer string.- Returns:
true
if the string represents a valid issuer identifier, elsefalse
.
-
isValid
public static boolean isValid(Issuer value)
Checks if the specified issuer is a valid identifier. This method isnull
-safe.- Parameters:
value
- The issuer.- Returns:
true
if the value is a valid identifier, elsefalse
.
-
isValid
public static boolean isValid(URI value)
Checks if the specified URI represents a valid issuer identifier. This method isnull
-safe.- Parameters:
value
- The URI.- Returns:
true
if the values represents a valid issuer identifier, elsefalse
.
-
isValid
public boolean isValid()
Checks if this issuer is a valid identifier. This method isnull
-safe.- Returns:
true
if the value is a valid identifier, elsefalse
.
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classIdentifier
-
-