Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

IBM API cookied based auth in outsystems

 My API from IBM needs a cookie based-auth for rest APIs. But my problem is how can I get these cookies? Because when I try requesting in Postman using only basic authentication it works and return some cookies (as you can see in the att). But when I try to authenticate in outsystems using only basic authentication it does not work, just when I include the header "cookies" from Postman it works.

And I tried to get these cookies in outsystems, but returning the error "401" it does not execute OnAfterResponse.

The cookies from Postman gets expired after some minutes

0 votes


Accepted answer

Permanent link

 I have a very hard time to understand what you are asking. There is no context what "outsystems" would be and what you are trying. There is no attachment or image I could see.


If you try to consume APIs such as the OSLC or reportable REST or other HTTP based APIS against the ELM tools, you need to understand cookies. Servers send cookies back to the client and the client is supposed to send the cookies back to the server in subsequent requests. This is usually handled by http clients using a "session". This is standard and not really special to ELM APIs. 

ELM authentication is relying on cookies and other information here what I know about this: 

Veronica Oliveira selected this answer as the correct answer

0 votes

Comments

 Hi, thanks for your quick reply.

Outsystems is a platform for creating web apps using LowCode. So we are consuming an API from an IBM application to use this information in a table.
When I request this API from Postman, I just need to provide my 'basic authentication' and 'accept' it as Headers. But when I request on Outsystems I need to give my 'basic authentication', 'accept' and 'cookies' as headers, the value of the cookies (JAZZ_AUTH_TOKEN, JSESSIONID, LtpaToken2) that I send are the ones I get after requesting on Postman, so they expire and I can't get another in Outsystems.
I'm trying to attach an image, but it's not accepting.
Thank you. 

Try using Chrome to attach the image.


I think you are asking in the wrong forum. You should ask in the Outsystems forum.
You can not use any tokens or cookies from POSTMAN. You have to use the mechanisms built into Outsystems to perform the login to the ELM application. This needs to be done in Outsystems, either by configuration or whatever mechanisms they provide. That should provide you a session that keeps the login valid.

I have already provided you links to understand what login options are available, especially the second one which is based on https://jazz.net/wiki/bin/view/Main/NativeClientAuthentication .

Sorry, but I do not think we can help you with your questions here. The means to login should be in your system. Be it OAuth, OICD, Basic Auth or whatever. You have to understand what your tool provides and how to use it and then adjust to what the overlap supported by ELM is. 

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,043
× 485

Question asked: Nov 03 '21, 3:37 p.m.

Question was seen: 1,603 times

Last updated: Nov 04 '21, 12:56 p.m.

Confirmation Cancel Confirm