Skip to Content
0
Jun 05, 2020 at 12:56 PM

Reusing the authentication token in CAP when consuming another service in a custom event handler

151 Views Last edit Jun 05, 2020 at 12:58 PM 2 rev

Hello,

my goal is to build an odata service whose create, update and delete operations are performed by an external service that is deployed in Cloud Foundry. To do so I want to implement a custom event handler like the following:

I created the destination and everything works fine. Now I would like to reuse the token that is in the request when the user is authenticated and reject it otherwise. I do not see any point in the CAP documentation where this scenario is described and the possibility in the API to define my own header in the request. Can I do that following this approach?

https://cap.cloud.sap/docs/guides/consuming-services

Attachments

liapi.png (47.0 kB)