AshAuthentication. Oauth2Server. PKCE
(ash_authentication_oauth2_server v0.1.0)
Copy Markdown
View Source
PKCE (RFC 7636) S256 helpers.
We only support S256 — plain is rejected at the authorize endpoint per
OAuth 2.1.
Summary
Functions
Compute the S256 code challenge for a verifier.
Constant-time comparison of verifier against a stored challenge.
Functions
Compute the S256 code challenge for a verifier.
challenge = base64url(sha256(verifier))
Constant-time comparison of verifier against a stored challenge.
Returns :ok if they match, :error otherwise. Bad input shapes return
:error rather than crashing.