Skip to main content

parse_client_data

Function parse_client_data 

Source
pub fn parse_client_data(raw: &[u8]) -> Result<ParsedClientData>
Expand description

Decode and parse raw clientDataJSON bytes.

raw must be the UTF-8 JSON bytes — not base64url encoded. The caller is responsible for base64url decoding the wire value before calling this.

Does not validate type, challenge, or origin — call validate_client_data for that, so each check can produce a precise error.

§Errors