You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auth correctness: SHA-512-256 digest, CORS expose WWW-Authenticate, basic-auth POST #15
postmanlabs/httpbin#641 — Expose WWW-Authenticate to CORS: browsers can't read the WWW-Authenticate response header from a 401 because the CORS config doesn't expose it.
(#697) Accept SHA-512-256 as the digest algorithm (route + validation). Refactor calculate_digest_response to use a single digest_hash_hex helper (removing the 5× duplicated algorithm match arms) that supports MD5, SHA-256, SHA-512, and SHA-512-256 (sha2::Sha512_256).
(#641) Add expose_header("WWW-Authenticate") to the CORS middleware so browser clients can read the challenge.
(#365/#607) Register POST routes for /basic-auth/{user}/{passwd}, /basic-auth/{user}, /hidden-basic-auth/{user}/{passwd}, /hidden-basic-auth/{user} (handlers are method-agnostic).
Benefits
Full RFC 7616 algorithm coverage for digest-auth testing.
Browser-side digest-auth flows work (WWW-Authenticate visible to JS).
Basic/hidden-basic auth testable over POST.
(#592 qop-omission deferred — it touches ~10 challenge-generation sites across 3 handlers and is niche RFC-2069-legacy testing; tracked separately.)
Activity
test: cover #15/#16 gaps (drip chunked, SHA-512-256 digest, CORS expose)