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 TypeMethodDescriptionbooleanbooleanequalsIgnoreTrailingSlash(Issuer other) Compares this issuer's URI to another issuer's URI, ignoring any trailing slashes.booleanisValid()Checks if this issuer is a valid identifier.static booleanChecks if the specified issuer is a valid identifier.static booleanChecks if the specified string represents a valid issuer identifier.static booleanChecks if the specified URI represents a valid issuer identifier.static IssuerParses 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 benullor 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:
trueif 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:
trueif 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:
trueif the values represents a valid issuer identifier, elsefalse.
-
isValid
Checks if this issuer is a valid identifier. This method isnull-safe.- Returns:
trueif the value is a valid identifier, elsefalse.
-
equals
- Overrides:
equalsin classIdentifier
-
equalsIgnoreTrailingSlash
Compares this issuer's URI to another issuer's URI, ignoring any trailing slashes. If either issuer isinvalidthis method falls back to the regularequals(Object)method.- Parameters:
other- The other issuer, ifnullthis method returnsfalse.- Returns:
trueif the URIs are equal, ignoring any trailing slashes, elsefalse.
-
parse
Parses an issuer from the specified string.- Parameters:
s- The string to parse,nullor empty if no issuer is specified.- Returns:
- The issuer,
nullif the parsed string wasnullor empty.
-