scottlamb / http-auth

Rust library for HTTP authentication. Parses challenge lists, responds to Basic and Digest challenges. Likely to be extended with server support and additional auth schemes.
https://crates.io/crates/http-auth
Apache License 2.0
5 stars 1 forks source link

Provide a way to parse a single challenge #2

Open Kladki opened 5 months ago

Kladki commented 5 months ago

Given that only a single challenge can be present per (non-WWW-Authenticate) header, would it make sense to provide a way to directly derive a single ChallengeRef from a str(ing) and/or HeaderValue?

scottlamb commented 2 months ago

Given that only a single challenge can be present per (non-WWW-Authenticate) header,

I don't follow. WWW-Authenticate is the usual header, or perhaps Proxy-Authenticate. What other header are you parsing that only allows one challenge?