Is client implementation for HTTP basic and digest authentication the same?

199 views Asked by At

According to Apache's guide to HTTP authentication. Both basic and digest authentication requires a UsernamePasswordCredentials instance.

My question is can I use the same client implementation for server authentication for both basic and digest following this example?

1

There are 1 answers

2
ok2c On BEST ANSWER

Yes, you can and you should. HttpClient is capable of employing different auth schemes in the course of a single request execution (for instance using Basic to authenticate with the proxy and NTLM to authenticate with the origin server)