spSSOInit.jsp revision 6ee2adce4b7ba1c7cdee88dce16cc901d1a1e1ce
$Id: spSSOInit.jsp,v 1.11 2009/06/24 23:05:30 mrudulahg Exp $
<%@ page import="com.sun.identity.saml.common.SAMLUtils" %>
<%@ page import="com.sun.identity.saml2.common.SAML2Exception" %>
<%@ page import="com.sun.identity.saml2.common.SAML2Utils" %>
<%@ page import="com.sun.identity.saml2.profile.SPCache" %>
<%@ page import="com.sun.identity.saml2.profile.SPSSOFederate" %>
<%@ page import="java.util.Map" %>
<%@ page import="org.forgerock.guice.core.InjectorHolder" %>
<%@ page import="org.forgerock.openam.audit.AuditEventPublisher" %>
<%@ page import="org.forgerock.openam.saml2.audit.SAML2Auditor" %>
<%@ page import="org.forgerock.openam.audit.AuditEventFactory" %>
spssoinit.jsp initiates the Single Sign-On at the Service Provider.
this parameter is /realm_name/SP name.
3. RelayState Target URL on successful complete of SSO/Federation
e.g. if the request URL has :
SSO/Federation user will be redirected to the TARGET URL.
11.AllowCreate Value indicates if IDP is allowed to created a new
12.Destination A URI Reference indicating the address to which the
13.AuthnContextDeclRef Specifies the AuthnContext Declaration Reference.
14.AuthnContextClassRef Specifies the AuthnContext Class References.
16.AuthComparison The comparison method used to evaluate the
17.Consent Specifies a URI a SAML defined identifier
known as Consent Identifiers.These are defined in
18.reqBinding URI value that identifies a SAML protocol binding to
19.affiliationID affiliation entity ID
20.sunamcompositeadvice URLEncoded XML blob that specifies auth level
21.includeRequestedAuthnContext boolean flag to indicate if the authentication request should include the
saml2Auditor.setMethod("spSSOInit");
String reqID = request.getParameter("requestID");
idpEntityID = SAML2Utils.getPreferredIDP(request);
paramsMap = (Map)SPCache.reqParamHash.get(reqID);
metaAlias = (String) paramsMap.get("metaAlias");
SPCache.reqParamHash.remove(reqID);
metaAlias = request.getParameter("metaAlias");
if ((metaAlias == null) || (metaAlias.length() == 0)) {
SAML2Utils.bundle.getString("nullSPEntityID"));
SAML2Utils.bundle.getString("nullSPEntityID"));
idpEntityID = request.getParameter("idpEntityID");
paramsMap = SAML2Utils.getParamsMap(request);
if ((idpEntityID == null) || (idpEntityID.length() == 0)) {
String readerURL = SAML2Utils.getReaderURL(metaAlias);
String rID = SAML2Utils.generateID();
String redirectURL = SAML2Utils.getRedirectURL(readerURL, rID, request);
paramsMap.put("metaAlias", metaAlias);
SPCache.reqParamHash.put(rID, paramsMap);
response.sendRedirect(redirectURL);
if ((idpEntityID == null) || (idpEntityID.length() == 0)) {
SAML2Utils.bundle.getString("nullIDPEntityID"));
SAML2Utils.bundle.getString("nullIDPEntityID"));
SPSSOFederate.initiateAuthnRequest(request, response, metaAlias, idpEntityID, paramsMap, saml2Auditor);
SAML2Utils.debug.error("Error sending AuthnRequest " , sse);
SAML2Utils.bundle.getString("requestProcessingError"));
SAML2Utils.debug.error("Error processing Request ",e);
SAML2Utils.bundle.getString("requestProcessingError") + " " +
e.getMessage());
SAML2Utils.bundle.getString("requestProcessingError"));