Any plans to add Digest Authentication to AutoWeb / Tasker (or other autoapps) [Edit: Fixed Title]

Discussion in 'App/Feature Suggestion' started by Akalsharan, May 30, 2020.

  1. Akalsharan

    Akalsharan New Member

    Joined:
    May 2, 2020
    Messages:
    6
    Likes Received:
    0
    Hi Joao,

    Thanks so much for all your hard work on these apps. Best apps on the market!

    I just wondered are there any plans to include digest authorization as an authorisation type (in Autoweb and/or Tasker and/or the AutoApps)? I know some other Tasker plug-ins have this, but would prefer it in your apps. It would help me access the Philips Android TV API, for example, so I'd be able to better control my TV and Tasker. The Remote Hue API also uses digest authorisation.

    Are there any plans to include?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,338
    Likes Received:
    784
    Hi. Can you share more details on this kind of authorization? :) I actually haven't heard about it I don't think...
     
  3. Akalsharan

    Akalsharan New Member

    Joined:
    May 2, 2020
    Messages:
    6
    Likes Received:
    0
    HI @joaomgcd, Thanks for getting back to me! Just realised I made a massive error. I meant Digest Authentication and not Digest Authorization! Apologies! :oops:. I'm sure you know what I meant though :)

    I stumbled across it partly by accident when trying to learn how to control my Philips Android TV with Tasker. After much trial & error and searching I found that Digest Auth was the way to reach the TV and successfully managed via Postman.

    I'm not that great at explaining it, so I've copied and pasted from another website.
    "Before credentials are transmitted, they are encrypted through the MD5 cryptographic hash function and used with nonce values to prevent replay attacks, as nonce values are used only once.

    The digest authentication process is as follows:

    1. A client requests access to a website with a username and a password.
    2. The server responds with a digest session key, a nonce and 401 authentication request.
    3. The client answers with a response array with a composition of (username:realm:password), which is encrypted using MD5.
    4. The server employs the username and realm to look up the password in the database, then uses that password to create a MD5 key using (username:realm:password_from_database).
    5. Then, the server compares its generated MD5 key to the client's submitted MD5 key. If it matches, the client is authenticated. If not, the client is denied access."

    Is it also useful to link this. I haven't trialed yet, but this link details the way to build the parameters for authenticating step-by-step for the Remote Hue API.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,338
    Likes Received:
    784
    Hi! Thanks for the explanation. However that last link you sent describes the authentication as Oauth2 authorization. Do you know why that is?
     
  5. Akalsharan

    Akalsharan New Member

    Joined:
    May 2, 2020
    Messages:
    6
    Likes Received:
    0
    I'm not completely sure to be honest. Sorry for not being able to answer.

    For controlling Philips Android TVs, I just use Postman (on PC) or HTTP Shortcuts (on Android, integrates with Tasker) and select the Digest Auth option, input username and password and all was done for me. Initial pairing with TV to get username and password was via here (if helpful).

    Edit: If useful, this seems a helpful working guide for digest auth in general
     
    Last edited: Jun 6, 2020
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,338
    Likes Received:
    784
  7. Akalsharan

    Akalsharan New Member

    Joined:
    May 2, 2020
    Messages:
    6
    Likes Received:
    0
    Thank you. I've added the request :)
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,338
    Likes Received:
    784
    Thank you! :)
     

Share This Page