Skip to main content

verify

Function verify 

Source
pub fn verify(
    code_verifier: &str,
    stored_challenge: &str,
    method: PkceMethod,
    policy: &PkcePolicy,
) -> Result<(), PkceError>
Expand description

Verify a PKCE code challenge against the verifier, under policy.

The error distinguishes a client bug (unknown method, malformed verifier) from a possible attack (mismatch), because the two deserve different responses: the first is a 400 invalid_request the client should see, the second is a 400 invalid_grant that reveals nothing.