I'm trying to use NTLM authentication in HttpClient 4.3.3 as follows:
BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider();
AuthScope authScope = new AuthScope(uri.getHost(), uri.getPort(), AuthScope.ANY_REALM, "ntlm");
credentialsProvider.setCredentials(authScope, new NTCredentials(username + ":" + password));
context.setCredentialsProvider(credentialsProvider);
I see it negotiating NTLM state up to MSG_TYPE3_GENERATED
before the server fails with 404.1
and logs The token supplied to the function is invalid (0x80090308)
.
It's a local account and not a domain account so SPN is not an issue. I've tried all combinations of domain and workstation names. Only Windows Authentication is enabled and only the NTLM provider is selected within it for this folder.
It works in the Android stock browser when I just enter the username and password in the prompt.
User contributions licensed under CC BY-SA 3.0