Package org.keycloak.protocol.oidc.utils
Class PkceUtils
- java.lang.Object
-
- org.keycloak.protocol.oidc.utils.PkceUtils
-
public class PkceUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description PkceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkParamsForPkceEnforcedClient(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)
static void
checkParamsForPkceNotEnforcedClient(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)
static String
encodeCodeChallenge(String codeVerifier, String codeChallengeMethod)
static String
generateCodeVerifier()
static String
generateS256CodeChallenge(String codeVerifier)
static boolean
validateCodeChallenge(String verifier, String codeChallenge, String codeChallengeMethod)
static void
verifyCodeVerifier(String codeVerifier, String codeChallenge, String codeChallengeMethod, String authUserId, String authUsername, EventBuilder event, Cors cors)
-
-
-
Method Detail
-
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)
-
-