[TIMOB-24785] Android: HTTPClient - Digest authentication not supported
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 6.1.0, Release 6.0.4, Release 8.0.2 |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | engSchedule, parity, qe-6.1.0 |
| Reporter | Abir Mukherjee |
| Assignee | Unknown |
| Created | 2017-06-06T20:27:56.000+0000 |
| Updated | 2019-07-09T15:49:56.000+0000 |
Description
*Description*
When using HTTPClient Basic Digest, a 401 unauthorized is thrown.
*Steps to reproduce*
1. Create a Titanium Classic App.
2. Replace the app.js code with the attached HttpClientAuthTest.js
3. Build to Android device
4. Press on "BASIC DIGEST - GET HTTPS" button
*Result*
401 errors are thrown:
[ERROR] : TiHTTPClient: (TiHttpClient-1) [0,4948] HTTP Error (java.io.IOException): 401 : UNAUTHORIZED
[ERROR] : TiHTTPClient: java.io.IOException: 401 : UNAUTHORIZED
[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1268)
[ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818)
*Expected Result*
Should get 200 success response, as it does with iOS devices.
Attachments
| File | Date | Size |
|---|---|---|
| HttpClientAuthTest.js | 2017-06-07T00:26:15.000+0000 | 1803 |
On iOS, HTTPClient supports the following authentication methods when the "username" and "password" properties are set: * Basic * Digest * NTLM This can be seen in our iOS code here: https://github.com/appcelerator/APSHTTPClient/blob/768c68283bbbcaae9e7440e7a62e3ba9675b884a/APSHTTPClient/APSHTTPRequest.m#L321 On Android, we only support "Basic" authentication. We should also support "Digest" for feature parity. NTLM is a Microsoft authentication method that would require a Windows IIS machine to test with. I think it's okay to skip NTLM support for now until a customer requests it.