Class PkceHelper
server-side PKCE generation. Produces a cryptographically random
code_verifier and its S256 code_challenge, plus a random state
parameter. These are stored in the pre-auth session; only code_challenge
and state are sent to the browser.
public static class PkceHelper
- Inheritance
-
objectPkceHelper
Methods
ComputeCodeChallenge(string)
Computes the S256 code_challenge for the given code_verifier.
public static string ComputeCodeChallenge(string codeVerifier)
Parameters
codeVerifierstring
Returns
- string
GenerateCodeVerifier()
Generates a 32-byte random base64url code_verifier (RFC 7636).
public static string GenerateCodeVerifier()
Returns
- string
GenerateState()
Generates a 24-byte random base64url state parameter.
public static string GenerateState()
Returns
- string