Package com.nimbusds.oauth2.sdk.pkce
Class CodeChallengeMethod
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.pkce.CodeChallengeMethod
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
Method that was used to derive an authorisation code challenge.
Related specifications:
- Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CodeChallengeMethod
Plain code challenge method.static final CodeChallengeMethod
SHA-256 code challenge method.Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static CodeChallengeMethod
Gets the default code challenge method.static CodeChallengeMethod
Parses a code challenge method from the specified value.Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Field Details
-
PLAIN
Plain code challenge method. -
S256
SHA-256 code challenge method.
-
-
Constructor Details
-
CodeChallengeMethod
- Parameters:
value
- The code challenge method value. Must not benull
or empty string.
-
-
Method Details
-
getDefault
Gets the default code challenge method.- Returns:
PLAIN
-
parse
Parses a code challenge method from the specified value.- Parameters:
value
- The code challenge method value. Must not benull
or empty string.- Returns:
- The code challenge method.
-
equals
- Overrides:
equals
in classIdentifier
-