Posted: 15 Mar 2018 1:10 EDT Last activity: 26 Mar 2018 11:17 EDT
Consuming REST servce from PEGA 7 with HTTP Header parameter
I am not a PEGA developer. But this question is for any PEGA developer/admin. This is about an issue which I noticed recently while trying to integrate my application (using REST service) with PEGA 7.
I created a REST service from my application and hosted it with OAuth 2.0 authentication. PEGA application has to consume my service.
Using any REST testing tool such as Chrome's REST console, APIgee, etc., I was able to test my REST service by just passing the http-header param as [param name: Authorization & param value: OAuth ].
But PEGA had an issue in directly supplying the http-header parameter to test my service from PEGA PRPC application.
My Questions for PEGA developers/Admins are,
is it difficult from PEGA to add a header param in http calls
On request, PEGA screen was shared with me while a developer attempted to test my service from PEGA. During which I noticed that PEGA did not have any trace logs to capture the exact http request that was generated. Is it true that we could not see the http request (header/body) that was generated from the REST connector tool?
You can configure your REST connector in Pega to use an Authentication Profile and Pega will automatically define those headers for you. The following link describes how to configure an OAuth 2 provider and refer to that in an Authentication Profile.
Note that the Pega OAuth provider depends on having an access token server (the way Twitter or LinkedIn do, for example). I've encountered REST services that don't implement the full OAuth standard and don't use an access token server. The Oauth provider will fail validation if you try to save it without specifying those URLs. In those scenarios, I haven't been able to use the out of the box authentication profile for OAuth and have had to build out custom connectors.