On Fri, 2013-02-22 at 07:33 -0800, preethig wrote: > Thanks Oleg. > > I have one more question, what configuration needs to be set on Httpclient > if one wants the client to try with basic authentication challenge incase > SPNEGO fails > eg: > > List<String> authpref = new ArrayList<String>(); > authpref.add(AuthPolicy.SPNEGO); > authpref.add(AuthPolicy.BASIC); > httpclient.getAuthSchemes().register(AuthPolicy.SPNEGO, spnego); > httpclient.getAuthSchemes().register(AuthPolicy.BASIC, new > BasicSchemeFactory()); > > I set the above configuration hoping the HttpClient will use the BASIC > scheme when the SPNEGO one fails? is it the right way? am i missing > something? > > Best Regards, > Preethi >
You do not need to do anything other than providing correct user credentials. HttpClient automatically falls back onto a less secure auth scheme as long as it is supported by the server and is present in the authentication challenge response. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
