【发布时间】:2013-12-19 15:31:49
【问题描述】:
Apache 4.3.x 按优先顺序记录以下身份验证方案:
[negotiate, Kerberos, NTLM, Digest, Basic]
如何更改此订单?
我尝试了以下方法:
DefaultHttpClient httpclient = new DefaultHttpClient(ccm, params);
// Choose BASIC over DIGEST for proxy authentication
List<String> authpref = new ArrayList<String>();
authpref.add(AuthPolicy.BASIC);
authpref.add(AuthPolicy.DIGEST);
httpclient.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF, authpref);
但这在 4.3.X 中已被弃用,所以也许更好的问题是如何在 4.3.x 中执行上述操作?
【问题讨论】:
标签: java apache authentication apache-httpclient-4.x