Java Code Examples for org.apache.http.client.config.AuthSchemes#NTLM
The following examples show how to use
org.apache.http.client.config.AuthSchemes#NTLM .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Winrm4jTool.java From brooklyn-server with Apache License 2.0 | 6 votes |
public Winrm4jTool(ConfigBag config) { this.bag = checkNotNull(config, "config bag"); host = getRequiredConfig(config, PROP_HOST); port = config.get(PROP_PORT); useSecureWinrm = config.get(USE_HTTPS_WINRM); authenticationScheme = config.get(USE_NTLM) ? AuthSchemes.NTLM : null; computerName = Strings.isNonBlank(config.get(COMPUTER_NAME)) ? config.get(COMPUTER_NAME) : null; user = getRequiredConfig(config, PROP_USER); password = getRequiredConfig(config, PROP_PASSWORD); execTries = getRequiredConfig(config, PROP_EXEC_TRIES); execRetryDelay = getRequiredConfig(config, PROP_EXEC_RETRY_DELAY); logCredentials = getRequiredConfig(config, LOG_CREDENTIALS); operationTimeout = config.get(OPERATION_TIMEOUT); retriesOfNetworkFailures = config.get(RETRIES_OF_NETWORK_FAILURES); environment = config.get(ENVIRONMENT); }
Example 2
Source File: ApacheHttpRequestFactory.java From ibm-cos-sdk-java with Apache License 2.0 | 5 votes |
/** * Convert the customer-facing authentication method into an apache-specific authentication method. */ private String toApacheAuthenticationScheme(ProxyAuthenticationMethod authenticationMethod) { if (authenticationMethod == null) { throw new IllegalStateException("The configured proxy authentication methods must not be null."); } switch (authenticationMethod) { case NTLM: return AuthSchemes.NTLM; case BASIC: return AuthSchemes.BASIC; case DIGEST: return AuthSchemes.DIGEST; case SPNEGO: return AuthSchemes.SPNEGO; case KERBEROS: return AuthSchemes.KERBEROS; default: throw new IllegalStateException("Unknown authentication scheme: " + authenticationMethod); } }
Example 3
Source File: BackportWindowsNTLMSchemeFactory.java From cyberduck with GNU General Public License v3.0 | 4 votes |
@Override public AuthScheme create(final HttpContext context) { return new BackportWindowsNegotiateScheme(AuthSchemes.NTLM, servicePrincipalName); }