realmSelection.jsp revision b93185b577f7150fec37f9999b95b246d73bf63c
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
d209ecb5fe6393098ebb1f1afeea3648b1bf89eafielding Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
d209ecb5fe6393098ebb1f1afeea3648b1bf89eafielding The contents of this file are subject to the terms
d209ecb5fe6393098ebb1f1afeea3648b1bf89eafielding of the Common Development and Distribution License
d209ecb5fe6393098ebb1f1afeea3648b1bf89eafielding (the License). You may not use this file except in
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd compliance with the License.
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd You can obtain a copy of the License at
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd See the License for the specific language governing
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd permission and limitations under the License.
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd When distributing Covered Code, include this CDDL
bfb214f8ec1b83a124e7a8caa495e3e8f19e9c75nd Header Notice in each file and include the License file
257db686a601ee0406953b7c3650da53adfc8b13nd If applicable, add the following below the CDDL Header,
0b0582a3aa10227767e359e693c4b43fec272388nd with the fields enclosed by brackets [] replaced by
257db686a601ee0406953b7c3650da53adfc8b13nd your own identifying information:
257db686a601ee0406953b7c3650da53adfc8b13nd "Portions Copyrighted [year] [name of copyright owner]"
0b0582a3aa10227767e359e693c4b43fec272388nd $Id: realmSelection.jsp,v 1.10 2009/10/29 00:00:00 exu Exp $
faf6c84e04f42e04b49985b4a28973dfd36e563fnd import="com.sun.identity.wsfederation.common.WSFederationConstants"
257db686a601ee0406953b7c3650da53adfc8b13nd import="com.sun.identity.wsfederation.common.WSFederationUtils"
257db686a601ee0406953b7c3650da53adfc8b13nd import="com.sun.identity.wsfederation.meta.WSFederationMetaManager"
257db686a601ee0406953b7c3650da53adfc8b13nd import="com.sun.identity.wsfederation.meta.WSFederationMetaUtils"
257db686a601ee0406953b7c3650da53adfc8b13nd import="com.sun.identity.wsfederation.jaxb.entityconfig.IDPSSOConfigElement"
0b0582a3aa10227767e359e693c4b43fec272388nd import="com.sun.identity.wsfederation.jaxb.wsfederation.FederationElement"
Debug debug = WSFederationUtils.debug;
String jspFile = "realmSelection.jsp: ";
String wreply = (String)request.getParameter("wreply");
String wctx = (String)request.getParameter("wctx");
if (debug.messageEnabled()) {
debug.message(jspFile + "wreply: "+wreply);
String spMetaAlias = WSFederationMetaUtils.getMetaAliasByUri(
if ( spMetaAlias==null || spMetaAlias.length()==0) {
/* TODO SAML2Utils.bundle.getString("nullSPEntityID") */);
metaManager.getEntityByMetaAlias(spMetaAlias);
String spRealm = WSFederationMetaUtils.getRealmByMetaAlias(spMetaAlias);
metaManager.getSPSSOConfig(spRealm,spEntityId));
String selectedRealm = (String)request.getParameter("realm_list");
if (debug.messageEnabled()) {
debug.message(jspFile + "Selected realm: " + selectedRealm);
url.append("?whr=");
url.append(selectedRealm);
url.append("&wctx=");
url.append(wctx);
if (debug.messageEnabled()) {
debug.message(jspFile + "Redirecting to: "+url);
String contextPath = request.getContextPath();
<script language="JavaScript" src="<%= contextPath %>/js/browserVersion.js"></script>
<script language="JavaScript" src="<%= contextPath %>/js/auth.js"></script>
var frm = document.forms['realm_form'];
frm.submit();
<script type="text/javascript"><!--// Empty script so IE5.0 Windows will draw table and button borders
<td width="50%"><img src="<%= contextPath %>/images/dot.gif" width="1" height="1" alt="" /></td>
<td><img src="<%= contextPath %>/images/dot.gif" width="728" height="1" alt="" /></td>
<td width="50%"><img src="<%= contextPath %>/images/dot.gif" width="1" height="1" alt="" /></td>
<tr class="LogTopBnd" style="background-image: url(<%= contextPath %>/images/gradlogtop.jpg);
<td><img src="<%= contextPath %>/images/dot.gif" width="1" height="30" alt="" /></td>
<td class="LogMidBnd" style="background-image: url(<%= contextPath %>/images/gradlogsides.jpg);
<td class="LogCntTd" style="background-image: url(<%= contextPath %>/images/login-backimage.jpg);
background-repeat:no-repeat;background-position:left top;" height="435" align="center" valign="middle">
<table border="0" background="<%= contextPath %>/images/dot.gif" cellpadding="0" cellspacing="0"
<td width="260"><img src="<%= contextPath %>/images/dot.gif" width="260" height="245" alt="" /></td>
<td width="415" bgcolor="#ffffff" valign="top"><img name="Login.productLogo"
src="<%= contextPath %>/images/PrimaryProductName.png" alt="OpenAM"
<form name="realm_form" action="<%=request.getRequestURI()%>"
<img src="<%= contextPath %>/images/dot.gif" width="1" height="25" alt="" />
if ( wctx != null && wctx.length() > 0 ) {
Cookie cookies[] = request.getCookies();
for (int i = 0; i < cookies.length; i++) {
if (debug.messageEnabled()) {
debug.message(jspFile + "Account Realm Cookie: " +
metaManager.getEntityDescriptor(spRealm,
metaManager.getIDPSSOConfig(spRealm,
if ( metaManager.isTrustedProvider(spRealm,
WSFederationMetaUtils.getAttribute(idpconfig,
if (debug.messageEnabled()) {
debug.message(jspFile + "account realm key: " +
if (displayName == null || displayName.length() == 0){
(accountRealmCookieValue.equals(issuerName))?"selected":"")%>>
<td><img src="<%= contextPath %>/images/dot.gif"
<td><img src="<%= contextPath %>/images/dot.gif"
<td width="45"><img src="<%= contextPath %>/images/dot.gif"
<td class="LogMidBnd" style="background-image: url(<%= contextPath %>/images/gradlogsides.jpg);
<tr class="LogBotBnd" style="background-image: url(<%= contextPath %>/images/gradlogbot.jpg);
Copyright © 2005 Sun Microsystems, Inc. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries.U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms. This distribution may include materials developed by third parties.Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.<br><br>Copyright © 2005 Sun Microsystems, Inc. Tous droits réservés.Sun Microsystems, Inc. détient les droits depropriété intellectuels relatifs à la technologie incorporée dans le produit qui est décrit dans ce document. En particulier, et ce sans limitation, ces droits de propriété intellectuelle peuvent inclure un ou plus des brevets américains listés à l'adresse http://www.sun.com/patents et un ou les brevets supplémentaires ou les applications de brevet en attente aux Etats - Unis et dans les autres pays.L'utilisation est soumise aux termes du contrat de licence.Cette distribution peut comprendre des composants développés par des tierces parties.Sun, Sun Microsystems et le logo Sun sont des marques de fabrique ou des marques déposées de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pays.</span></div>