Does Basic User Authentication require 2-Phase communiation?
- by RED SOFT ADAIR-StefanWoe
My Application connects to the Internet to HTTP Services using boost::asio. Recently we added support for HTTP Proxys and Basic User Authentication. We implemented Basic User Authentication by just sending Authentication parameters with every HTTP call if a user configured a proxy in our program. Parameters are sent as described here:
Authorization: Basic <base64 Encoded username:password>
This works at least for one user and his proxy server. Other users report that their Proxy server replys with
407 Proxy Authentication Required
My guess is that some proxy servers accept 1 one phase authentication and that others don't. I do not find any information that a 2 Phase communication is requested where the access always is denied for the first call by returning 407 and that only a second call is accepted.
Our program yet does not retry the call if a 407 has been returned. Do we have to add this?
I asked this question before on stackoverflow but did not get a sufficient answer.