SAMLSSORespDTO authRespDTO = ssoServiceClient.authenticate(authnReqDTO, ssoTokenID);
if (authRespDTO.getSessionEstablished()) { // authentication is SUCCESSFUL
storeSSOTokenCookie(ssoTokenID, httpServletRequest, httpServletResponse);
String respSessionAuthID = sessionManager.addNewSession(new FESessionBean(authRespDTO, sessionBean.getRelayState()));
sessionManager.removeSession(authSessionID); // remove the SAMLSSORespDTO
httpServletResponse.sendRedirect(getAdminConsoleURL(httpServletRequest) + "sso-saml/redirect_ajaxprocessor.jsp?" + SAMLSSOProviderConstants.FE_SESSION_KEY + "=" + respSessionAuthID);
} else { // authentication FAILURE
validationResponseDTO.setValid(false);
httpServletResponse.sendRedirect(calculateLoginPage(
getAdminConsoleURL(httpServletRequest), authRespDTO.getLoginPageURL())+ "?" + SAMLSSOProviderConstants.FE_SESSION_KEY + "=" + authSessionID);