Class 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
    • 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​(Identifier value)
        Creates a new client identifier with the specified value.
        Parameters:
        value - The value. Must not be null.
      • 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.