validator.jsp revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
eb342a1f0f84e3622fc67dafdeb13ad11f1e501cMatt Sweeney DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney The contents of this file are subject to the terms
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney of the Common Development and Distribution License
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney (the License). You may not use this file except in
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney compliance with the License.
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney You can obtain a copy of the License at
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney https://opensso.dev.java.net/public/CDDLv1.0.html or
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney See the License for the specific language governing
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney permission and limitations under the License.
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney When distributing Covered Code, include this CDDL
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney Header Notice in each file and include the License file
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney If applicable, add the following below the CDDL Header,
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney with the fields enclosed by brackets [] replaced by
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney your own identifying information:
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney "Portions Copyrighted [year] [name of copyright owner]"
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney $Id: validator.jsp,v 1.8 2009/11/20 22:45:57 ggennaro Exp $
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page pageEncoding="UTF-8"%>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="com.sun.identity.common.SystemConfigurationUtil" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="com.sun.identity.shared.Constants" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="com.sun.identity.workflow.ValidateSAML2" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="com.sun.identity.workflow.WorkflowException" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.net.MalformedURLException" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.net.URL" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.net.URLEncoder" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.text.MessageFormat" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.util.Locale" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney<%@ page import="java.util.ResourceBundle" %>
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney String deployuri = null;
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney String serverURL = null;
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney URL url = new URL(request.getRequestURL().toString());
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney String prot = url.getProtocol();
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney port = prot.equals("http") ? "443" : "80";
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney deployuri = url.getPath();
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney int idx = deployuri.indexOf("/", 1);
6f22811f3148a8875c32d1e4a34f19dc1b8579d4Matt Sweeney if (idx != -1) {
deployuri = deployuri.substring(0, idx);
serverURL = prot + "://" + url.getHost() + ":" + port + deployuri;
deployuri = SystemConfigurationUtil.getProperty(
String serverProtocol = SystemConfigurationUtil.getProperty(
String serverHost = SystemConfigurationUtil.getProperty(
String serverPort = SystemConfigurationUtil.getProperty(
request.setCharacterEncoding("UTF-8");
String realm = request.getParameter("realm");
String cot = request.getParameter("cot");
String idp = request.getParameter("idp");
String sp = request.getParameter("sp");
String locale = request.getParameter("locale");
String authIDPPassed = ValidateSAML2.getMessage(
"validate.help.auth.idp.passed", locale);
String authIDPFailed = ValidateSAML2.getMessage(
"validate.help.auth.idp.failed", locale);
String authIDPAgain = ValidateSAML2.getMessage(
"validate.auth.idp.again", locale);
String authSPPassed = ValidateSAML2.getMessage(
"validate.help.auth.sp.passed", locale);
String authSPFailed = ValidateSAML2.getMessage(
"validate.help.auth.sp.failed", locale);
String authSPAgain = ValidateSAML2.getMessage(
"validate.auth.sp.again", locale);
String accLinkTitle = ValidateSAML2.getMessage(
"validate.title.account.linking", locale);
String accLinkPassed = ValidateSAML2.getMessage(
"validate.help.account.linking.passed", locale);
String accLinkFailed = ValidateSAML2.getMessage(
"validate.help.account.linking.failed", locale);
String sloTitle = ValidateSAML2.getMessage(
"validate.title.single.logout", locale);
String sloPassed = ValidateSAML2.getMessage(
"validate.help.single.logout.passed", locale);
String sloFailed = ValidateSAML2.getMessage(
"validate.help.single.logout.failed", locale);
String ssoPassed = ValidateSAML2.getMessage(
"validate.help.single.login.passed", locale);
String ssoFailed = ValidateSAML2.getMessage(
"validate.help.single.login.failed", locale);
String ssoAgain = ValidateSAML2.getMessage(
"validate.help.single.login.again", locale);
String accTermTitle = ValidateSAML2.getMessage(
"validate.title.account.termination", locale);
String accTermPassed = ValidateSAML2.getMessage(
"validate.help.account.termination.passed", locale);
String accTermFailed = ValidateSAML2.getMessage(
"validate.help.account.termination.failed", locale);
Object[] param = {validator.getIDPEntityId()};
"validate.title.auth.idp", locale), param);
Object[] param = {validator.getSPEntityId()};
"validate.title.auth.sp", locale), param);
if (validator.isIDPHosted()) {
Object[] param = {validator.getIDPEntityId()};
"validate.title.single.login_hosted", locale), param);
Object[] param = {validator.getSPEntityId()};
"validate.title.single.login_remote", locale), param);
setupFailedTitle = ValidateSAML2.getMessage(
"validate.title.setup.failed", locale);
if (setupError.length() > 0) {
out.println("logout();");
if (!validator.isFedlet()) {
out.println("setTimeout(\"authIdp()\", 3000);");
out.println("setTimeout(\"singleLogin()\", 3000);");
validator.getIDPLogoutURL() + "');");
if (!validator.isFedlet()) {
validator.getSPLogoutURL() + "');");
if ((validator != null) && !validator.isFedlet()) {
"?goto=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=idpauth&v=1") +
"&gotoOnFail=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=idpauth&v=-1") + "');");
window.scrollTo(0, 0);
top.showFooter('');
top.showFooter('');
if ((validator != null) && !validator.isFedlet()) {
"?goto=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=spauth&v=1") +
"&gotoOnFail=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=spauth&v=-1") + "');");
window.scrollTo(0, 50);
top.showFooter('');
top.showFooter('');
if ((validator != null) && !validator.isFedlet()) {
"&RelayState=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=acclink&v=1") + "');");
window.scrollTo(0, 150);
top.showFooter('');
top.showFooter('');
if ((validator != null) && !validator.isFedlet()) {
"&RelayState=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=slo&v=1") + "');");
window.scrollTo(0, 200);
top.showFooter('');
top.showFooter('');
if( validator.isSalesforceSP() ) {
"&RelayState=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=sso&v=1&sendRedirectForValidationNow=true") + "');");
window.scrollTo(0, 250);
var url = "validatorRpt.jsp";
out.println("url += '?idp=' + '" +
if (validator.isFedlet()) {
out.println("url += '&fedlet=' + '" +
out.println("url += '&sp=' + '" +
top.gotoURL(url);
top.showFooter('');
if (!validator.isFedlet()) {
out.println("accTermination();");
out.println("getReport();");
top.showFooter('');
top.showFooter('');
top.showFooter('');
"&RelayState=" + URLEncoder.encode(serverURL +
"/validatorStatus.jsp?s=accTerm&v=1") + "');");
window.scrollTo(0, 250);
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><div><img src="<%= deployuri %>/com_sun_web_ui/images/other/dot.gif" alt="" border="0" height="10" width="30" /></div></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><div><img src="<%= deployuri %>/com_sun_web_ui/images/other/dot.gif" alt="" border="0" height="10" width="30" /></div></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><div><img src="<%= deployuri %>/com_sun_web_ui/images/other/dot.gif" alt="" border="0" height="10" width="30" /></div></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><div><img src="<%= deployuri %>/com_sun_web_ui/images/other/dot.gif" alt="" border="0" height="10" width="30" /></div></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>
<tr><td><div><img src="<%= deployuri %>/com_sun_web_ui/images/other/dot.gif" alt="" border="0" height="10" width="30" /></div></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspointer.gif" width="33" height="33" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progresspassed.gif" width="28" height="26" /></td>
<tr><td><img src="<%= deployuri %>/console/images/progressfailed.gif" width="28" height="26" /></td>