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

jayv25585659 27-03-2019

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

Accepted Solutions (1)

Accepted Solutions (1)

PuzanovsP
MVP
28-03-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

Answers (1)

Answers (1)

vaibhavs7024655 28-03-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