Package com.nimbusds.oauth2.sdk.pkce
Class CodeChallenge
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.pkce.CodeChallenge
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
Authorisation code challenge.
Related specifications:
- Proof Key for Code Exchange by OAuth Public Clients (RFC 7636)
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Method Summary
Modifier and TypeMethodDescriptionstatic CodeChallenge
compute
(CodeChallengeMethod method, CodeVerifier codeVerifier) Computes the code challenge using the specified method and verifier.static CodeChallenge
Parses a code challenge from the specified string.Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, equals, getValue, hashCode, toJSONString, toString, toStringList
-
Method Details
-
compute
Computes the code challenge using the specified method and verifier.- Parameters:
method
- The code challenge method. Must be supported and notnull
.codeVerifier
- The code verifier. Must not benull
.- Returns:
- The computed code challenge.
-
parse
Parses a code challenge from the specified string.- Parameters:
value
- The code challenge value.- Returns:
- The code challenge.
- Throws:
ParseException
- If parsing failed.
-