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
@Immutable public final class CodeChallengeMethod extends Identifier
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CodeChallengeMethod
PLAIN
Plain code challenge method.static CodeChallengeMethod
S256
SHA-256 code challenge method.-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description CodeChallengeMethod(String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
static CodeChallengeMethod
getDefault()
Gets the default code challenge method.static CodeChallengeMethod
parse(String value)
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 Detail
-
PLAIN
public static final CodeChallengeMethod PLAIN
Plain code challenge method.
-
S256
public static final CodeChallengeMethod S256
SHA-256 code challenge method.
-
-
Constructor Detail
-
CodeChallengeMethod
public CodeChallengeMethod(String value)
- Parameters:
value
- The code challenge method value. Must not benull
or empty string.
-
-
Method Detail
-
getDefault
public static CodeChallengeMethod getDefault()
Gets the default code challenge method.- Returns:
PLAIN
-
parse
public static CodeChallengeMethod parse(String value)
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
public boolean equals(Object object)
- Overrides:
equals
in classIdentifier
-
-