php-http / message

HTTP Message related tools
http://php-http.org
MIT License
1.29k stars 41 forks source link

Add auto BasicAuth credential detection based on URL #38

Closed sagikazarmark closed 8 years ago

xabbuh commented 8 years ago

Could this work with Digest authentication too?

sagikazarmark commented 8 years ago

Good question.

I think as in case of oauth, digest auth can only work as a separate plugin as it needs a request first in order to retrieve the server nonce.

So with a slightly difference code and a different plugin: probably yes.

But as a plain authentication method: not sure. Since the method is immutable, you have to provide every data in the constructor.

dbu commented 8 years ago

is this what a web browser does with such urls? then i agree this is a good thing to have. is there a corresponding doc PR already? if not, at least create an issue - if we lose track of features the doc will quickly go out of sync and it becomes a huge pain to figure out discrepancies (been there, done that)

sagikazarmark commented 8 years ago

Yes, this is a client responsibility. Will open a doc PR. It will probably be easier if we start using issue/PR templates: https://github.com/php-http/boilerplate/tree/master/.github