Class PkceUtils

java.lang.Object
org.keycloak.protocol.oidc.utils.PkceUtils

public class PkceUtils extends Object
  • Constructor Details

    • PkceUtils

      public PkceUtils()
  • Method Details

    • generateCodeVerifier

      public static String generateCodeVerifier()
    • encodeCodeChallenge

      public static String encodeCodeChallenge(String codeVerifier, String codeChallengeMethod)
    • generateS256CodeChallenge

      public static String generateS256CodeChallenge(String codeVerifier) throws Exception
      Throws:
      Exception
    • validateCodeChallenge

      public static boolean validateCodeChallenge(String verifier, String codeChallenge, String codeChallengeMethod)
    • checkParamsForPkceEnforcedClient

      public static void checkParamsForPkceEnforcedClient(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)
    • checkParamsForPkceNotEnforcedClient

      public static void checkParamsForPkceNotEnforcedClient(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)
    • verifyCodeVerifier

      public static void verifyCodeVerifier(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)