Interface PkceService
public interface PkceService
Methods used by the PKCE implementation
https://datatracker.ietf.org/doc/html/rfc7636
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisExpectedCodeChallengeGenerated(String expectedCodeChallenge, CodeChallengeMethod codeChallengeMethod, String codeVerifier) Checks if the expected code challenge is produced by applying the given code challenge method to the given code verifier.booleanisValidCode(String input) Checks if the given string is a valid PKCE code challenge or PKCE code verifier.
-
Method Details
-
isValidCode
Checks if the given string is a valid PKCE code challenge or PKCE code verifier. This method SHOULD NOT be used on authorization codes. Input must have at least 43 characters. Input must not have more than 128 characters. Input must only contain characters from "a-z"/"A-Z"/"0-9"/"-"/"."/"_"/"~".- Parameters:
input- the string to check.- Returns:
- true if valid.
-
isExpectedCodeChallengeGenerated
boolean isExpectedCodeChallengeGenerated(@Nonnull String expectedCodeChallenge, @Nonnull CodeChallengeMethod codeChallengeMethod, @Nonnull String codeVerifier) Checks if the expected code challenge is produced by applying the given code challenge method to the given code verifier.- Parameters:
expectedCodeChallenge- the expected code challenge from applying the transformationcodeChallengeMethod- the transformation to apply to the code verifiercodeVerifier- the code verifier- Returns:
- true if the expected code challenge was produced
-