Expand my Community achievements bar.

SOLVED

Reading Cookies from Third party server returned cookies?

Avatar

Level 9

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

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

3 Replies

Avatar

Level 10
You  can use Java app logic within the servlet to read cookies. See  http://tutorials.jenkov.com/java-servlets/cookies.html.  

Avatar

Level 9

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

Avatar

Correct answer by
Level 2

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