Skip to main content

normalize_auth_blob

Function normalize_auth_blob 

Source
pub fn normalize_auth_blob(bytes: &[u8]) -> EngineResult<Vec<u8>>
Expand description

Validate and canonicalize an externally-supplied auth blob (the vs auth import path). Parses it — accepting a v1 or v2 JSON body — and re-encodes as a canonical v2 blob, so an imported session from a human’s real browser is stored in exactly the shape load_auth expects. Errors if the bytes are not a valid auth blob.