Reading Cookies from Third party server returned cookies? | Community
Skip to main content
GK-007
New Participant
October 16, 2015
Solved

Reading Cookies from Third party server returned cookies?

  • October 16, 2015
  • 3 replies
  • 1084 views

Hi All,

As part of our login module implementation,for login form we are redirecting from AEM to third party application.User enter email-ID and Password and press enter.Now this third party application validates authentication and send token information and resides in the

cookie.Now i have to read them and use it in sling servlet.

Can some one have idea on reading these cookies?

Thanks,

Kishore

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Alex Collignon

Hi Kishore,

In addition to Scott recommendations, I suggest you have a look at the security concerns related to session management and cookie storage [1].

Hope that helps,

[1] https://www.owasp.org/index.php/OWASP_Application_Security_FAQ#Cookies_and_Session_Management

Alex

3 replies

smacdonald2008
New Participant
October 16, 2015
You  can use Java app logic within the servlet to read cookies. See  http://tutorials.jenkov.com/java-servlets/cookies.html.  
GK-007
GK-007Author
New Participant
October 16, 2015

Thanks Scott.

So cookies or params can be retrieved using request/response objects passed to sling servlet's doGet or doPost methods.

or in CQ do we need to follow any other way to get this informaiton?

Thanks,

Kishore

Alex CollignonAccepted solution
Employee
October 16, 2015

Hi Kishore,

In addition to Scott recommendations, I suggest you have a look at the security concerns related to session management and cookie storage [1].

Hope that helps,

[1] https://www.owasp.org/index.php/OWASP_Application_Security_FAQ#Cookies_and_Session_Management

Alex