Class AuthorizationCode

java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.AuthorizationCode
All Implemented Interfaces:
Serializable, Comparable<Identifier>, net.minidev.json.JSONAware

@Immutable public final class AuthorizationCode extends Identifier
Authorisation code. A maximum authorisation code lifetime of 10 minutes is recommended.

Related specifications:

  • OAuth 2.0 (RFC 6749)
See Also:
  • Constructor Details

    • AuthorizationCode

      public AuthorizationCode(String value)
      Creates a new authorisation code with the specified value.
      Parameters:
      value - The code value. Must not be null or empty string.
    • AuthorizationCode

      public AuthorizationCode(int byteLength)
      Creates a new authorisation code 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.
    • AuthorizationCode

      Creates a new authorisation code with a randomly generated 256-bit (32-byte) value, Base64URL-encoded.
  • Method Details