Support Article
pxHTTPServletRequest is unavailable outside the authentication
SA-86926
Summary
User retrieves SAML from the pxHTTPServletRequest header and sends it to every webservice call as it expires every 15 minutes. Pega only allows access to pxHTTPServletRequest during the authentication. Requirement is to access the header outside the authentication. Exception occurs on using the below code outside the authentication activity:
javax.servlet.http.HttpServletRequest req;
req = (javax.servlet.http.HttpServletRequest) pxRequestorPage.getObject("pxHTTPServletRequest");
Error Messages
Null Pointer exception
Steps to Reproduce
- Log in to the application
- Authenticate the user using the SAML
- Renew or retrieve the SAML before invoking the webservice to send it in the SOAP Request header
- Use the code outside the authentication activity. Exception occurs
Root Cause
This issue was determined to be a product enhancement request.
Resolution
An enhancement request, FDBK-61575, is created for consideration by Pega Product Management.
Published October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.