com.nimbusds.oauth2.sdk.id
Class ClientID

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.id.Identifier
      extended by com.nimbusds.oauth2.sdk.id.ClientID
All Implemented Interfaces:
net.minidev.json.JSONAware

@Immutable
public final class ClientID
extends Identifier

Client identifier. This class is immutable.

Example of a client identifier created from string:

 ClientID clientID = new ClientID("client-12345678");
 

Related specifications:

Author:
Vladimir Dzhuvinov

Field Summary
 
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH
 
Constructor Summary
ClientID()
          Creates a new client identifier with a randomly generated value.
ClientID(int length)
          Creates a new client identifier with a randomly generated value of the specified length.
ClientID(String value)
          Creates a new client identifier with the specified value.
 
Method Summary
 boolean equals(Object object)
          Overrides Object.equals().
 
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
getValue, hashCode, toJSONString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientID

public ClientID(String value)
Creates a new client identifier with the specified value.

Parameters:
value - The client identifier value. Must not be null or empty string.

ClientID

public ClientID(int length)
Creates a new client identifier with a randomly generated value of the specified length. The value will be made up of mixed-case alphanumeric ASCII characters.

Parameters:
length - The number of characters. Must be a positive integer.

ClientID

public ClientID()
Creates a new client identifier with a randomly generated value. The value will be made up of 32 mixed-case alphanumeric ASCII characters.

Method Detail

equals

public boolean equals(Object object)
Description copied from class: Identifier
Overrides Object.equals().

Specified by:
equals in class Identifier
Parameters:
object - The object to compare to.
Returns:
true if the objects have the same value, otherwise false.


Copyright © 2013 NimbusDS. All Rights Reserved.