Skip to content

Instantly share code, notes, and snippets.

@fobbyal
Last active March 30, 2016 13:27
Show Gist options
  • Save fobbyal/7b1c88c232efa72e754c629c221db474 to your computer and use it in GitHub Desktop.
Save fobbyal/7b1c88c232efa72e754c629c221db474 to your computer and use it in GitHub Desktop.
AuthPolicy.registerAuthScheme(AuthPolicy.NTLM, JCIFS_NTLMScheme.class);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("USER");
auth.setPassword("PASSWORD");
auth.setDomain("DOMAIN");
auth.setHost("host.com");
auth.setPort(443);
List authPrefs = new ArrayList(1);
authPrefs.add(AuthPolicy.NTLM);
auth.setAuthSchemes(authPrefs);
options.setProperty(HTTPConstants.AUTHENTICATE, auth);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment