Package com.nimbusds.oauth2.sdk
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
Authorisation code. A maximum authorisation code lifetime of 10 minutes is
recommended.
Related specifications:
- OAuth 2.0 (RFC 6749)
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new authorisation code with a randomly generated 256-bit (32-byte) value, Base64URL-encoded.AuthorizationCode
(int byteLength) Creates a new authorisation code with a randomly generated value of the specified byte length, Base64URL-encoded.AuthorizationCode
(String value) Creates a new authorisation code with the specified value. -
Method Summary
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Constructor Details
-
AuthorizationCode
Creates a new authorisation code with the specified value.- Parameters:
value
- The code value. Must not benull
or empty string.
-
AuthorizationCode
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
public AuthorizationCode()Creates a new authorisation code with a randomly generated 256-bit (32-byte) value, Base64URL-encoded.
-
-
Method Details
-
equals
- Overrides:
equals
in classIdentifier
-