Hi,
We have a secured API and need to include Authorization header to request. How should I pass this header (or any other) to "RestURL " attribute?
Thank you
Hi Mykola,
I think that's a non-supported scenerio. However, as a work-around you could create a local proxy REST service that consumes the secured API, passing along the input and output.
Hi Killian.
What do you mean by local proxy REST? Expose unprotected API that makes call to protected API via OS Consume Node passing all needs headers?
Mykola (Nick) Tkachenko wrote:
Yes, that's what I had in mind. To make it more secure, you can add "local" security like Marcelo described.
What we did was to make a protected REST call on the preparation to create a token and than we use that token to call the rest of the grid.
Regards,
Marcelo
Marcelo Ferreira wrote:
I have a token generated on preparation, How should I pass add it to RestURL as Authorization header?
So you called the protected REST and it returns a token that was saved on the DB of that module. Than you can call the grid REST with the token as parameter. The grid REST will check the db if the token exists and didn't expire. the Expiration date can be just a couple of seconds.
So token will be sent in URL as a parameter?
In this case we can't just use oAuth2 component as it checks https://www.outsystems.com/forge/component-overview/3573/oauth2-provider
Can we somehow use local text variable instead of grid RestURL ?
I didn't find a way of doing it. Even if is not ideal for us we still use REST URL's when using data grid. Maybe if you change the Data Grid itself.