Enum Class PkceMethod

java.lang.Object
java.lang.Enum<PkceMethod>
org.forgerock.oauth.clients.oauth2.PkceMethod
All Implemented Interfaces:
Serializable, Comparable<PkceMethod>, java.lang.constant.Constable

public enum PkceMethod extends Enum<PkceMethod>
Proof Key for Code Exchange (PKCE) transformation method.
See Also:
  • Enum Constant Details

    • 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 Details

    • values

      public static PkceMethod[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PkceMethod valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCodeChallenge

      public abstract String getCodeChallenge(String verifier)
      Returns the code challenge to send on the authorization request.
      Parameters:
      verifier - the random code verifier associated with the request.
      Returns:
      the transformed code challenge.