REST API Digest access authentication

Hi, I need to consume REST API with Digest Access Authentication.
I tried REST in Service Studio, but it seems only support Basic Access Authentication.

Is there any plugin or extension or at least sample apps for me to learn how to do it.

Thanks in advance.

Rank: #668

Hi Harlin,

When consuming REST APIs you can implement other types of authentication by using the OnBeforeRequest / OnBeforeRequestAdvanced callbacks. These allow you to customize the requests before they are sent, so you can add the necessary headers for the authentication your service requires.

You can find many of examples on how these can be used to implement custom authentication to various services. Just search in the Forge for REST API, and you will find connectors to various popular SaaS and sites.

As for documentation you can find further details below:

Simple Customizations using OnBeforeRequest

Advanced Customizations using OnBeforeRequestAdvanced

Extensibility API for Extensions inside OnBeforeRequestAdvanced

About Digest Access Authentication, as far as I know there are no sample in the forge that implements it. From what I've read in https://en.wikipedia.org/wiki/Digest_access_authentication you will be able to implement this authentication these callbacks.

Share with us how it worked out, and if you want step into the spotlight submit a sample to our Forge!


Rank: #16876

Hi, thanks for the head-ups...

From the wiki, I will need MD5 function.

Can I use the built in GenerateSaltedMD5Hash?

Rank: #12297


The builtin GenerateSaltedMD5Hash function will salt its input and hash it using the MD5 hash algorithm. Since there is a private salt being applied, the resulting MD5 hash will be different from the one Digest authentication mechanisms will be looking for.
To be perfectly clear, this function cannot be used for your intent and you will need to create an extension to achieve what you need.

This extension shouldn't be too hard to create, you can use the example in here to give you a head start.

Hope this helps,

Ricardo Silva
Rank: #0

Hello Harlin,

The CryptoAPI component has functions to produce hashes from strings.

Perhaps it can help you with this endeavor.

Rank: #479

Hello! Is there already a easy way to do this in OS 11?

Rank: #475


The information in the above posts still remains correct - there's no out-of-the-box implementation for Digest access authentication, but it's possible to implement it using the REST extensibility capabilities.

Please check the linked pages in the previous posts. If you have a specific question, don't hesitate to ask!


Pedro Guimarães

Rank: #479

Hi Pedro, Sorry for my late response I did not see that you replied on my message. Probably it would be to much to ask but would you be able to provide me with a espace where the Digest authentication trough the rest api is implemented. I tried to get this working but I could not unfortunately.

Rank: #204

You can use Oauth2. Please check the article  https://www.outsystems.com/blog/posts/securing-outsystems-apis-oauth2/

Rank: #479

I need to connect to a service that uses digest authentication how could that Oauth2 help me in that case?

Rank: #479

Anyone a idea?

Rank: #19

Hi Freek,

I don't think OAuth 2.0 authorisation protocol can help you with implementing Digest access authentication method.

Check the links that Ricardo Ferreira points to, and Ricardo Silva's Crypto API suggestion for an MD5 implementation. As far as I can tell, no one has made a publicly available implementation of the Digest access authentication method.

Rank: #19

Hi Vijay,

I believe Harlin's question was over two years ago... for better or worse, it's likely sorted out. More recently, Freek seems to have a similar requirement.

Also their question is specifically about Digest Access Authentication method support. Have you implemented this authentication method in the application you linked to?