multi.jsp revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
321N/A<%--
321N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
321N/A
321N/A Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
321N/A
321N/A The contents of this file are subject to the terms
321N/A of the Common Development and Distribution License
321N/A (the License). You may not use this file except in
321N/A compliance with the License.
321N/A
321N/A You can obtain a copy of the License at
321N/A https://opensso.dev.java.net/public/CDDLv1.0.html or
321N/A opensso/legal/CDDLv1.0.txt
321N/A See the License for the specific language governing
321N/A permission and limitations under the License.
321N/A
321N/A When distributing Covered Code, include this CDDL
321N/A Header Notice in each file and include the License file
321N/A at opensso/legal/CDDLv1.0.txt.
321N/A If applicable, add the following below the CDDL Header,
321N/A with the fields enclosed by brackets [] replaced by
321N/A your own identifying information:
321N/A "Portions Copyrighted [year] [name of copyright owner]"
321N/A
321N/A $Id: multi.jsp,v 1.1 2009/07/02 22:00:17 exu Exp $
321N/A
321N/A--%><%@page
321N/A import="com.sun.identity.wsfederation.common.WSFederationConstants"
321N/A import="com.sun.identity.plugin.session.SessionManager"
321N/A import="com.sun.identity.wsfederation.common.WSFederationUtils"
321N/A%><%
321N/A // handle multi-federation protocol case
493N/A Object uSession = null;
321N/A try {
321N/A uSession = SessionManager.getProvider().getSession(request);
321N/A } catch (Exception e) {
493N/A }
321N/A
321N/A if ((uSession == null) || !SessionManager.getProvider().isValid(uSession)) {
493N/A String wreply = request.getParameter(
321N/A WSFederationConstants.LOGOUT_WREPLY);
321N/A if ((wreply != null) && (wreply.length() != 0)) {
321N/A response.sendRedirect(wreply);
321N/A }
321N/A } else {
321N/A request.setAttribute(WSFederationConstants.LOGOUT_WREPLY,
493N/A request.getParameter(WSFederationConstants.LOGOUT_WREPLY));
493N/A request.setAttribute(WSFederationConstants.REALM_PARAM,
321N/A request.getParameter(WSFederationConstants.REALM_PARAM));
321N/A request.setAttribute(WSFederationConstants.ENTITYID_PARAM,
request.getParameter(WSFederationConstants.ENTITYID_PARAM));
WSFederationUtils.processMultiProtocolLogout(
request, response, uSession);
}
%>