Digest authorization in using consume REST API

Hello developers.

I cant get a Digest authorization working from Outsystems rest. Does anyone have a working example?

Hi Freek,

I noticed you already read the post https://www.outsystems.com/forums/discussion/20826/rest-api-digest-access-authentication/

So what did you already do and into what problem are you running, can you share an .oml?



Hi Daniel, thanks for your reply I really appreciated that. I tried to connect with the rest service to the page where the Digist authentication is needed. The problem is that with Digist first a call needs to be done to fetch the client nonce, realm and opaque. Then with those values some hashes can be calculated and send back. Maybe the rest service is not really a good solution for doing this. So I was hoping maybe somebody already created a extension for this.

The url where I send a get message to is:

In the reponse headers I see:
WWW-Authenticate: Digest realm="BaikalDAV",qop="auth",nonce="5cfa6d6cb2a54",opaque="d66d5f0524036afcb61420e358f990ce"

Building the Authorization header would result in:
Digest username="username", realm="BaikalDAV", nonce="5cfa6d6cb2a54", uri="/card.php", qop="auth", nc="00000001", cnonce="0a4f113b", response="Response", opaque="d66d5f0524036afcb61420e358f990ce"

Where Response then is build by:

HA1 = md5 ("username:BaikalDAV:password")
HA2 = md5 ("GET:/card.php")

Reponse = md5 ("HA1:nonce:nc:cnonce:qop:HA2")

Only I still get a error that username password is incorrect.