Question

4
Replies
2295
Views
SmithaR1 Member since 2016 27 posts
Nielsen
Posted: 4 years ago
Last activity: 4 years 1 month ago
Closed
Solved

How to read Extra Parameter during Log In

Hi - 

In out application we need to ensure that User logs in by clicking on a link that he received via email.

 

This URL should have an extra parameter say "User_Key" .

 

When the user clicks on this link he is is routed to the Pega Login page .He has to enter his credentials and click on log in. On log in I need to compare the User Key with a value stored in Pega Data.

 

I Customized the IAC Authentication Service to call an activity which extracts this values. 

 

However in the activity I cannot retrieve the value of User_Key when user clicks on login (even though User_key) exists in the URL. 

I can get the value of User_Key if I refresh the link but not on click of Log In Button. 

 

In my activity I retrieve the value using : 

@java("((javax.servlet.http.HttpServletRequest)tools.getRequestor().getRequestorPage().getObject(\"pxHTTPServletRequest\")).getParameter(\"UserKey\")")

 

Can you let me know how we can retrieve this value on click of the Log In Button.

 

Also I need to save this value to DB, but Pega throws an exception when I try to Open the Data Page because at this point authentication is not complete yet. 

How can I save this value to DB after the user Authenticates?

Thank you. 

***Updated by moderator: Lochan to add Category***

Data Integration
Moderation Team has archived post
Share this page LinkedIn