I am trying to use AuthenticationInfoPostProcessor to read SAML response and do some business logic in AEM as cloud service.
Facing following issues:
1. Getting multiple hits to this class - want to know what event invokes the postProcess method of this class?
2. When the user is logging in through SSO, IDP is redirecting to <publish domain>/content/<abc>/saml_login but when i am trying to check the same condition in post processor, this does not seem to work. Below is the code snippet that i am using:
public void postProcess(AuthenticationInfo info, HttpServletRequest request, HttpServletResponse response)
throws LoginException {
HttpServletResponse httpResponse = null;
HttpServletRequest httpRequest = null;
try {
LOGGER.info("SAMLResponse Post Processor invoked");
httpResponse = response;
httpRequest = request;
String pathInfo = httpRequest.getPathInfo();
if (StringUtils.isNotEmpty(pathInfo) && pathInfo.contains("saml_login")) {
LOGGER.info("SAMLResponse Post Processor processing ...");
String responseSAMLMessage = httpRequest.getParameter("saml_login");
if (StringUtils.isNotEmpty(responseSAMLMessage)) {
LOGGER.info("responseSAMLMessage:" + responseSAMLMessage);
I am getting multiple entries of first logger in the logs but its not going to if block on successful saml_login.