Skip to main content

canonicalize_basic_credentials

Function canonicalize_basic_credentials 

Source
pub fn canonicalize_basic_credentials(value: &[u8]) -> Option<String>
Expand description

Decode a Basic <token> value into the canonical username:hex(sha256(password)) shape that check_authorized_hashes compares against. Returns None for any malformed input — wrong scheme, non-base64 token, missing :, non-UTF-8 username, or oversized payload.