Question
Huntington Bancshares Inc
US
Last activity: 26 Oct 2015 16:24 EDT
Receive info from HTTP header
PRPC is embedded withi n an iFrame. The outer application is to send information via http header. How will PRPC read parameters via http header during authentication?
We are on 6.3 SP1
-
Like (0)
Pavan Emani -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
AU
Within the authentication activity you can use:
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest) pxRequestorPage.getObject("pxHTTPServletRequest"); String yourHeader = request.getHeader("yourHeader");
Search mesh for pxHTTPServletRequest for more info.
Huntington Bancshares Inc
US
Hi Joel -
getObject(“pxHTTPServletRequest”) returns null. The clipboard value of pxHTTPServletRequest is - Java Object: (null).
PRPC is embedded within an iFrame of the outer application. PRPC wants to read the header info sent by that outer application.
Pegasystems Inc.
AU
HI Nipin,
Are you trying to retrieve the values in your authentication activity?
This would be expected if you try anywhere else as the property is only readable during authentication.
Huntington Bancshares Inc
US
Yes Joel -
I added the below code after the operator is authenticated in our authentication activity.
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)tools.getRequestor().getRequestorPage().getObject("pxHTTPServletRequest");
if (request != null) {
String ivuser = request.getHeader("X-Session-Id");
oLog.error("This is the request header" + ivuser );
}
Huntington Bancshares Inc
US
Joel - I ran the fiddler. Looks like the above code captures the header info made from the PRPC app server. The outer application is a not a prpc application and resides in another server.
Hi Nipun, Info that you are looking for at pega end should be sent from browser. how the info from outer application is sent to pega? probably It is part of the http request from browser to pega.
Huntington Bancshares Inc
US
Hi Gopi - yes, the info is part of the http request from browser to pega. how can pega capture that info ?
Pegasystems Inc.
AU
Sounds like the issue is actually passing the header to the iframe src.
This isn't a pega specific issue, however if you google 'how to set custom http headers when changing iframe src' there is a stack overflow article which demonstrates how this is done in javascript.
Huntington Bancshares Inc
US
Hi Joel - We are already doing this (passing parameters to the iframe src). However, due to security issues, we are not supposed to do it. We are looking for an alternative for PRPC to read http headers from browser instead. Any thoughts?
Hi Nipun, are you able to see value being sent out in fiddler trace as part of the http request and still could not read it at pega end? if yes, open a SR with us.
Pegasystems Inc.
US
I wanted to verify if you saw Gopinathan Ganapathy's reply and if you had to open an SR with us. If you had to open an SR, please let us know and we can update this thread to track for you!
Thanks!
Pegasystems Inc.
US
Thank you! I updated the thread!
Huntington Bancshares Inc
US
Hi Gopi -
Pega is able to read http headers in the authentication activity using pxHTTPServletRequest. However, we would like to read HTTP headers every time the user toggles between pega and the outer application in the same browser session. Any thoughts ?
When I am trying to retrieve the values outside authentication, its not working