Parse SAML response | Community
Skip to main content
New Participant
May 5, 2017
Solved

Parse SAML response

  • May 5, 2017
  • 2 replies
  • 1923 views

Hi All,

We are using the OOTB SAML Handler for authentication. Now we need to parse the SAML response to retrieve data from the response. We have followed below mentioned two links to implement the solution:

http://apoorva-ganapathy.blogspot.com/2016/08/aem-processing-saml-response-using.html

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__mdrg-has_anyone_triedto.html

But control is not coming in "if" when we use following condition as suggested in first link:

if (runModes.contains("publish") && StringUtils.isNotEmpty(pathInfo)
&& pathInfo.contains("saml_login")) {

when i added debug statements to analyze, i couldn't see the request coming to postProcessor for "/saml_login" and hence the code is not getting executed.But the Post postprocessor is getting called for rest of each calls.

Can someone please suggest here.

AEM 6.2

Thanks,

Nitish

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 Nitish_Jain01

Hi,

OOTB SAML Authentication Handler is working perfectly fine and response is POST. I have checked the response being stored under user node. Thanks i will pick that. I was facing problem in :

if (runModes.contains("publish") && StringUtils.isNotEmpty(pathInfo)
&& pathInfo.contains("saml_login")) {

this was to ensure that only when the request is send to SAML HANDLER and response is returned i.e. only once, the subsequent logic to follow.

2 replies

Nitish_Jain01AuthorAccepted solution
New Participant
May 5, 2017

Hi,

OOTB SAML Authentication Handler is working perfectly fine and response is POST. I have checked the response being stored under user node. Thanks i will pick that. I was facing problem in :

if (runModes.contains("publish") && StringUtils.isNotEmpty(pathInfo)
&& pathInfo.contains("saml_login")) {

this was to ensure that only when the request is send to SAML HANDLER and response is returned i.e. only once, the subsequent logic to follow.

MC_Stuff
New Participant
May 5, 2017

Hi Nitish,

Make sure saml response to AEM is POST method instead of GET.  Parsed saml response is stored under user profile node & you can make use of the same. 

Thanks,