Package com.nimbusds.oauth2.sdk.id
Class ClientID
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.id.Identifier
-
- com.nimbusds.oauth2.sdk.id.ClientID
-
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
@Immutable public final class ClientID extends Identifier
Client identifier.Example of a client identifier created from string:
ClientID clientID = new ClientID("client-12345678");
Related specifications:
- OAuth 2.0 (RFC 6749), section 2.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 ClientID()
Creates a new client identifier with a randomly generated 256-bit (32-byte) value, Base64URL-encoded.ClientID(int byteLength)
Creates a new client identifier with a randomly generated value of the specified byte length, Base64URL-encoded.ClientID(Identifier value)
Creates a new client identifier with the specified value.ClientID(String value)
Creates a new client identifier with the specified value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
-
-
-
Constructor Detail
-
ClientID
public ClientID(String value)
Creates a new client identifier with the specified value.- Parameters:
value
- The client identifier value. Must not benull
or empty string.
-
ClientID
public ClientID(Identifier value)
Creates a new client identifier with the specified value.- Parameters:
value
- The value. Must not benull
.
-
ClientID
public ClientID(int byteLength)
Creates a new client identifier with a randomly generated value of the specified byte length, Base64URL-encoded.- Parameters:
byteLength
- The byte length of the value to generate. Must be greater than one.
-
ClientID
public ClientID()
Creates a new client identifier with a randomly generated 256-bit (32-byte) value, Base64URL-encoded.
-
-
Method Detail
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classIdentifier
-
-