Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24785] Android: HTTPClient - Digest authentication not supported

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 6.1.0, Release 6.0.4, Release 8.0.2
Fix Version/sn/a
Componentsn/a
LabelsengSchedule, parity, qe-6.1.0
ReporterAbir Mukherjee
AssigneeUnknown
Created2017-06-06T20:27:56.000+0000
Updated2019-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

FileDateSize
HttpClientAuthTest.js2017-06-07T00:26:15.000+00001803

Comments

  1. Joshua Quick 2017-06-07

    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.

JSON Source