Skip to main content

Module client_data

Module client_data 

Source
Expand description

Parsing and validation of clientDataJSON.

clientDataJSON is a JSON object produced by the browser that binds a WebAuthn ceremony to a specific type, challenge, and origin. The relying party must verify all three fields before accepting any ceremony.

This module separates parsing from validation so that error messages can name the exact failing field (type mismatch vs challenge mismatch vs origin mismatch) rather than a generic “invalid client data”.

Structs§

ParsedClientData
Decoded and structured clientDataJSON ready for validation.

Functions§

parse_client_data
Decode and parse raw clientDataJSON bytes.
validate_client_data
Validate the parsed client data against the expected ceremony parameters.