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
Issuer identifier.
Valid issuer identifiers are URIs with "https" schema and no query or fragment component.
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsIgnoreTrailingSlash
(Issuer other) Compares this issuer's URI to another issuer's URI, ignoring any trailing slashes.boolean
isValid()
Checks if this issuer is a valid identifier.static boolean
Checks if the specified issuer is a valid identifier.static boolean
Checks if the specified string represents a valid issuer identifier.static boolean
Checks if the specified URI represents a valid issuer identifier.static Issuer
Parses an issuer from the specified string.Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Constructor Details
-
Issuer
Creates a new issuer identifier with the specified value.- Parameters:
value
- The issuer identifier value. Must not benull
or empty string.
-
Issuer
Creates a new issuer identifier with the specified URI value.- Parameters:
value
- The URI value. Must not benull
.
-
Issuer
Creates a new issuer identifier with the specified value.- Parameters:
value
- The value. Must not benull
.
-
-
Method Details
-
isValid
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
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
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
Checks if this issuer is a valid identifier. This method isnull
-safe.- Returns:
true
if the value is a valid identifier, elsefalse
.
-
equals
- Overrides:
equals
in classIdentifier
-
equalsIgnoreTrailingSlash
Compares this issuer's URI to another issuer's URI, ignoring any trailing slashes. If either issuer isinvalid
this method falls back to the regularequals(Object)
method.- Parameters:
other
- The other issuer, ifnull
this method returnsfalse
.- Returns:
true
if the URIs are equal, ignoring any trailing slashes, elsefalse
.
-
parse
Parses an issuer from the specified string.- Parameters:
s
- The string to parse,null
or empty if no issuer is specified.- Returns:
- The issuer,
null
if the parsed string wasnull
or empty.
-