Enum PkceMethod
- java.lang.Object
-
- java.lang.Enum<PkceMethod>
-
- org.forgerock.oauth.clients.oauth2.PkceMethod
-
- All Implemented Interfaces:
Serializable
,Comparable<PkceMethod>
public enum PkceMethod extends Enum<PkceMethod>
Proof Key for Code Exchange (PKCE) transformation method.- See Also:
- RFC 7636.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
getCodeChallenge(String verifier)
Returns the code challenge to send on the authorization request.static PkceMethod
valueOf(String name)
Returns the enum constant of this type with the specified name.static PkceMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLAIN
public static final PkceMethod PLAIN
The code challenge is identical to the code verifier.
-
S256
public static final PkceMethod S256
The code challenge is a SHA-256 hash of the code verifier.
-
NONE
public static final PkceMethod NONE
The OAuth 2.0 provider does not support PKCE at all.
-
-
Method Detail
-
values
public static PkceMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PkceMethod c : PkceMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PkceMethod valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-