Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Reading Cookies from Third party server returned cookies?

GK-AEM
Level 9
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
Alexandre_COLLI
Correct answer by
Level 2
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
smacdonald2008
Level 10
Level 10
You  can use Java app logic within the servlet to read cookies. See  http://tutorials.jenkov.com/java-servlets/cookies.html.  
GK-AEM
Level 9
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

Alexandre_COLLI
Correct answer by
Level 2
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