How do I read (via Java?) the SAML response from my SSO provider? | Community
Skip to main content
jayv25585659
Level 8
March 28, 2019
Solved

How do I read (via Java?) the SAML response from my SSO provider?

  • March 28, 2019
  • 2 replies
  • 4361 views

We have protected some published pages via login through our SSO provider. I would like to read the SAML response so we can customize some of the things that's displayed on the page.

How can this be done?

I've searched the net and the results I've found involves the configuration to setup AEM to connect to a SSO provider.

Thanks

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 Peter_Puzanovs

Hey Jay,

It really depends on the facts that are being passed to you through your SSO Provider and how your SSO Provier read SAML Spec.

There is OOTB config that you can add that will sync the parameters stored in the: Synchronized Attributes of the Adobe Granite SAML 2.0 Authentication Handler, config that is found in the OSGi Config.

Regards,

Peter

2 replies

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
March 28, 2019

Hey Jay,

It really depends on the facts that are being passed to you through your SSO Provider and how your SSO Provier read SAML Spec.

There is OOTB config that you can add that will sync the parameters stored in the: Synchronized Attributes of the Adobe Granite SAML 2.0 Authentication Handler, config that is found in the OSGi Config.

Regards,

Peter

vaibhavs7024655
Level 3
March 28, 2019

jayv25585659 AFAIK, this can be achieved using the Open SAML APIs https://build.shibboleth.net/nexus/content/sites/site/java-support/7.4.2/apidocs/  .

Below is a sample piece of code which I used in the past to read a SAML response, however not within AEM:

Please note all the required APIs sufficient enough to read the SAML response are available under Open SAML only https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation