idpSSOInit.jsp revision f5efa5619bc4c83c0a58f55945e87d480e1011da
1N/A $Id: idpSSOInit.jsp,v 1.9 2009/06/24 23:05:30 mrudulahg Exp $
1N/A<%@ page import="com.sun.identity.saml.common.SAMLUtils" %>
1N/A<%@ page import="com.sun.identity.saml2.common.SAML2Constants" %>
1N/A<%@ page import="com.sun.identity.saml2.common.SAML2Exception" %>
1N/A<%@ page import="com.sun.identity.saml2.common.SAML2Utils" %>
1N/A<%@ page import="com.sun.identity.saml2.meta.SAML2MetaUtils" %>
1N/A<%@ page import="com.sun.identity.saml2.profile.IDPSSOUtil" %>
1N/A<%@ page import="java.io.PrintWriter" %>
1N/A<%@ page import="org.forgerock.guice.core.InjectorHolder" %>
1N/A<%@ page import="org.forgerock.openam.audit.AuditEventPublisher" %>
1N/A<%@ page import="org.forgerock.openam.saml2.audit.SAML2Auditor" %>
1N/A<%@ page import="org.forgerock.openam.audit.AuditEventFactory" %>
1N/A idpssoinit.jsp initiates Unsolicited SSO at the Identity Provider.
1N/A this parameter is /realm_name/IDP name.
1N/A 3. RelayState Target URL on successful complete of SSO/Federation
1N/A SSO/Federation user will be redirected to the TARGET URL.
1N/A saml2Auditor.setMethod("idpSSOInit");
1N/A if ((cachedResID != null) && (cachedResID.length() != 0)) {
1N/A IDPSSOUtil.sendResponse(request, response, new PrintWriter(out, true), cachedResID);
1N/A String metaAlias = request.getParameter("metaAlias");
1N/A if ((metaAlias == null) || (metaAlias.length() == 0)) {
1N/A request, response, response.SC_BAD_REQUEST, "nullIDPEntityID",
1N/A SAML2Utils.bundle.getString("nullIDPEntityID"));
1N/A SAML2Utils.bundle.getString("nullSPEntityID"));
1N/A String spEntityID = request.getParameter("spEntityID");
1N/A if ((spEntityID == null) || (spEntityID.length() == 0)) {
1N/A request, response, response.SC_BAD_REQUEST, "nullSPEntityID",
1N/A SAML2Utils.bundle.getString("nullSPEntityID"));
1N/A SAML2Utils.bundle.getString("nullSPEntityID"));
1N/A String relayState = SAML2Utils.getRelayState(request);
1N/A IDPSSOUtil.doSSOFederate(request, response, new PrintWriter(out, true), null, spEntityID, metaAlias,
1N/A SAML2Utils.debug.error("Error processing request " , sse);
1N/A SAML2Utils.bundle.getString("requestProcessingError") + " " +
1N/A sse.getMessage());
1N/A SAML2Utils.bundle.getString("requestProcessingError"));
1N/A SAML2Utils.debug.error("Error processing request ",e);
1N/A SAML2Utils.bundle.getString("requestProcessingError") + " " +
1N/A e.getMessage());
1N/A SAML2Utils.bundle.getString("requestProcessingError"));