maoertel / diqwest

Crate to extend `reqwest` to be able to send with digest auth flow.
https://docs.rs/diqwest
MIT License
18 stars 3 forks source link

Remove previous Authorization header #7

Closed rcastill closed 1 year ago

rcastill commented 1 year ago

I have the following use-case:

User gives authenticated url. Something like this: http://user:pass@host:port/path

If request is submitted with such an Url with reqwest, it will automatically form the "Authorization" header, assuming it's basic authentication.

The idea is to be able to "automatically detect" if it is basic auth or digest auth.

In order to implement this, send_with_digest_auth() could remove any previous "Authorization" headers set. But I'm not sure if this is possible. Maybe reqwest adds the header after send_with_digest_auth() acts.

Is this even something that diqwest should handle?

Maybe this issue can be brought to reqwest itself?

maoertel commented 1 year ago

Hey @rcastill,

I really have to look into my notification setup 🤦🏾

If you are interested to handle it I encourage you to open a PR and then let's discuss.

✌🏾

maoertel commented 1 year ago

Closing this as to my feeling it does not fall into the responsibility of this crate.