Here is how I passed my &^%&*^%&% NTLM proxy with spring-social milestone 1:
Code:
public class FacebookTemplateExt extends FacebookTemplate
{
public FacebookTemplateExt(String accessToken, boolean puseProxy, String pproxyUrl, int pproxyPort, String pproxyLogin, String pproxyPwd)
{
super(accessToken);
if(puseProxy)
{
HttpClient httpclient = ((CommonsClientHttpRequestFactory) (((RestTemplate) restOperations).getRequestFactory()))
.getHttpClient();
httpclient.getHostConfiguration().setProxy(pproxyUrl, pproxyPort);
List<String> authPrefs = new ArrayList<String>(2);
authPrefs.add(AuthPolicy.DIGEST);
authPrefs.add(AuthPolicy.BASIC);
// This will exclude the NTLM authentication scheme
httpclient.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
httpclient.getState().setProxyCredentials(AuthScope.ANY, new UsernamePasswordCredentials(pproxyLogin, pproxyPwd));
}
}
I will try to adapt to spring-social M3.
Ludovic