Skip to main content

parse_mfa_header

Function parse_mfa_header 

Source
pub fn parse_mfa_header(value: &str) -> Result<(String, String), MfaError>
Expand description

Parse the x-amz-mfa header value, format: <serial> <code> where code is a 6-digit ASCII numeric string. Whitespace runs of more than one ASCII space between serial and code are rejected; trailing / leading whitespace likewise. AWS itself accepts a single ASCII space here — clients always emit exactly one — so we keep the parser strict to surface caller bugs early.