-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support NTLM auth #206
Comments
After learning about NTLM, I don't think we want to implement it. I'm going to icebox this. |
Eagerly awaiting the NTLM support. |
@post2shyam don't hold your breath! The NTLM technology is not a good fit for OkHttp: in particular it interferes with connection management. If you'd like to fork and see what you can build, I'm curious to see what it looks like. |
Also maybe possible to do NTLM as an interceptor? Worth investigating at least. |
Just a proof of concept: (NTLMEngineImpl is standalone version of org.apache.http.impl.auth.NTLMEngineImpl - removed all dependencies to org.apache.http.* and change org.apache.commons.codec.binary.Base64 to android Base64) - works fine with okhttp:2.4.0 usage:
code:
|
great |
No further action for us to take on this. |
@SelvinPL it works with Okhttp3.4.1 also. Thank you for enlightenment. |
@SelvinPL @swankjesse |
Non ... grab code from http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.5.2/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java ... make few obvious changes to get code compiled ... and that's it
|
Hi guys. does any one have ready-to-use NTLMEngineImpl.java class? I'm having difficules with modification of it. Project version of SDK is 24 |
have you try @SelvinPL advice? otherwise you can trace apache lib and extract from it. I hope i can make a small lib soon. |
I did provide link to the code and diff patch. it's all you need to use it. |
sorry, I've no experience to modify this quickly, so I thought some one has compiled class. |
It's never coming to generate type3 message and at last it gives bad request. Please help. |
So... I made changes to get it to compile and got a jar building with it - https://github.com/richmidwinter/okhttp-ntlm At runtime it tries to auth (against MS Exchange) 20 times getting a 401 and then quits out (it does get as far the type3 message for me). Pretty certain my auth details are correct though. Same credentials work via NTLM with the Insomnia app. Any ideas? |
Depending on jcifs' implementation instead works for me. Repo updated: https://github.com/richmidwinter/okhttp-ntlm |
Could you test something with "not working" version? |
Hello! Sorry for english, I use google translator. The problem is as follows: Details of my implementation:
REQUEST:
RESPONSE:
========================================================== REQUEST:
RESPONSE:
========================================================== REQUEST:
RESPONSE:
2.1 I use OkHttpClient ver. 3.4.1:
2.2 I use retrofit ver. 2.1.0:
2.3 Source code for the NTLMAuthenticator class:
I will be glad to any help. |
Still working on 'com.squareup.okhttp3:okhttp:3.10.0' . |
No description provided.
The text was updated successfully, but these errors were encountered: