On Wed, 2010-10-27 at 19:53 -0500, Mills, Nick wrote:
> I don't want to authenticate with the proxy using NTLM v2 (because it's not 
> supported).
> So is there a way to force basic authentication in 4.0.2?
> 
> I'm stuck with the 4.0.2 version because I'm using WebDriver 2.0a6.
> 
> For older 3.x HttpClients we could do:
> 
> HttpClient client = new HttpClient();
> List authPrefs = new ArrayList(2);
> authPrefs.add(AuthPolicy.DIGEST);
> authPrefs.add(AuthPolicy.BASIC);
> // This will exclude the NTLM authentication scheme
> client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
> 
> Am I able to do something similar with 4.0.2?
> 

Yes, you can

With HttpClient 4.0.x one can override the
AbstractAuthenticationHandler#getAuthPreferences() method in order to
return a different sequence of preferred auth schemes

With HttpClient 4.1-alpha-x one can also use
'http.auth.proxy-scheme-perf' and 'http.auth.target-scheme-perf'
parameters to set a particular sequence of preferred auth schemes for
proxy and target authentication respectively.

Please also note HttpClient 4.1 HEAD (to be released as 4.1-beta1 soon)
fully supports NTLMv1 and NTLMv2 auth schemes out of the box

Hope this help

Oleg 

> Thanks,
> Nick Mills



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to