Closed yoshuawuyts closed 3 years ago
I've added support for WWW-Authenticate
, but need to change it up slightly before merging. Right now we support at most 1 authentication scheme, but the spec says this should be up to n. Also since Proxy-Authenticate
parses exactly the same way as WWW-Authenticate
we can copy-paste the impl once it works. That should provide the majority of common authentication things.
Okay; all implemented!
BasicAuth
seems to work fine, as I am using it here: https://github.com/squamishaccess/squamishaccess-signup-function-rs/blob/6c445916760a4db21da80c732fbe8e9c704c1bd1/src/main.rs#L168-L172
However I did run into a UX issue with typed headers and surf: https://github.com/http-rs/surf/issues/251
Ref #99
Adds HTTP basic auth and related structs for authentication.
BasicAuth is a specialization of
Authorization
; because schemes like oauth are rather elaborate, we've chosen to put them into separate structs.Thanks!
Screenshots