Support Article
Unable to validate users on an API using JSON Web Token
SA-65421
Summary
Unable to validate users on an API using JSON Web Token (JWT) tokens.
The Authentication Bearer is not passed to Pega on selecting 'Custom' as authentication type. It is only passed on selecting 'OAuth 2.0', with OAuth tokens.
Error Messages
Not Applicable.
Steps to Reproduce
Unknown.
Root Cause
A defect or configuration issue in the operating environment.
Resolution
Perform the following local-change:Retrieve the custom header in the authentication activity with a Property-Set as below:
Param.value=@java("((javax.servlet.http.HttpServletRequest)tools.getRequestor().getRequestorPage().getObject(\"pxHTTPServletRequest\")).getHeader(\"tes\")")
Here, HTTP header is set as 'test'.Published August 19, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.