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

public class CodeChallenge extends Identifier
Authorisation code challenge.

Related specifications:

  • Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).
See Also:
  • Method Details

    • compute

      public static CodeChallenge compute(CodeChallengeMethod method, CodeVerifier codeVerifier)
      Computes the code challenge using the specified method and verifier.
      Parameters:
      method - The code challenge method. Must be supported and not null.
      codeVerifier - The code verifier. Must not be null.
      Returns:
      The computed code challenge.
    • parse

      public static CodeChallenge parse(String value) throws ParseException
      Parses a code challenge from the specified string.
      Parameters:
      value - The code challenge value.
      Returns:
      The code challenge.
      Throws:
      ParseException - If parsing failed.