Examples of NTLMCredentials


Examples of org.gradle.internal.resource.transport.http.ntlm.NTLMCredentials

    private void useCredentials(DefaultHttpClient httpClient, PasswordCredentials credentials, String host, int port) {
        Credentials basicCredentials = new UsernamePasswordCredentials(credentials.getUsername(), credentials.getPassword());
        httpClient.getCredentialsProvider().setCredentials(new AuthScope(host, port), basicCredentials);

        NTLMCredentials ntlmCredentials = new NTLMCredentials(credentials);
        Credentials ntCredentials = new NTCredentials(ntlmCredentials.getUsername(), ntlmCredentials.getPassword(), ntlmCredentials.getWorkstation(), ntlmCredentials.getDomain());
        httpClient.getCredentialsProvider().setCredentials(new AuthScope(host, port, AuthScope.ANY_REALM, AuthPolicy.NTLM), ntCredentials);

        LOGGER.debug("Using {} and {} for authenticating against '{}:{}'", new Object[]{credentials, ntlmCredentials, host, port});
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.