/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: FSTerminationInitiationServlet.java,v 1.7 2008/12/19 06:50:47 exu Exp $
*
*/
/**
* Used to initiate federation termination.
*/
/**
* Initializes the servlet.
* @param config the <code>ServletConfig</code> object that contains
* configutation information for this servlet.
* @exception ServletException if an exception occurs that interrupts
* the servlet's normal operation.
*/
throws ServletException
{
}
/**
* Handles the HTTP GET request.
* @param request <code>HttpServletRequest</code> object that contains the
* request the client has made of the servlet.
* @param response <code>HttpServletResponse</code> object that contains
* the response the servlet sends to the client.
* @exception ServletException if an input or output error is detected when
* the servlet handles the GET request
* @exception IOException if the request for the GET could not be handled
*/
public void doGet(
throws ServletException, IOException
{
}
/**
* Handles the HTTP POST request.
* @param request <code>HttpServletRequest</code> object that contains the
* request the client has made of the servlet.
* @param response <code>HttpServletResponse</code> object that contains
* the response
* the servlet sends to the client.
* @exception ServletException if an input or output error is detected when
* the servlet handles the POST request
* @exception IOException if the request for the POST could not be handled
*/
public void doPost(
throws ServletException, IOException
{
}
/**
* Invoked when the user clicks on the termination link in the application.
* @param request <code>HttpServletRequest</code> object that contains the
* request the client has made of the servlet.
* @param response <code>HttpServletResponse</code> object that contains
* the response the servlet sends to the client.
* @exception ServletException,IOException if the request could not be
* handled
*/
private void doGetPost(
throws ServletException, IOException
{
// Alias processing
+ "Cannot process request");
return;
}
if (metaManager == null) {
"Cannot process request");
return;
}
try {
if (hostedRole != null &&
{
} else if (hostedRole != null &&
{
}
if (hostedProviderDesc == null) {
}
} catch (IDFFMetaException eam) {
"Unable to find Hosted Provider. not process request", eam);
return;
}
boolean isIDP = false;
{
isIDP = true;
}
return;
}
return;
}
/**
* Invoked to set some commonly used registration URLs based on hosted
* provider.
* @param hostedConfig hosted provider's extended meta.
* @param metaAlias hosted provider's meta alias
*/
}
/**
* Retrieves session token from <code>HTTPServletRequest</code>
* object.
* @param request HTTP request object
* @return the valid session token from the request object;
* <code>null</code> otherwise.
*/
{
"Entered FSTerminationInitiationServlet::getValidToken");
try {
"redirecting for authentication");
return null;
}
return ssoToken;
} catch (SessionException e) {
return null;
}
}
/**
* Called when a Termination needs to be initiated with a remote provider.
* @param request <code>HTTPServletRequest</code> object received via a
* HTTP Redirect
* @param response <code>HTTPServletResponse</code> object to send the
* response back to user agent
* @param hostedProviderDesc the provider where termination is initiated
* @param hostedConfig hosted provider's extended meta
* @param realm the realm under which the entity resides
* @param hostedEntityId hosted provider's entity ID
* @param hostedRole hosted provider's role
* @param providerAlias hosted provider's meta alias
*/
private void doTerminationInitiation(
{
"Entered FSTerminationInitiationServlet::doTerminationInitiation");
try {
"Provider Id not found, display error page");
return;
}
// session token is valid, ProviderId available
if (instSManager != null) {
if (ssoSession != null) {
if (!ssoSession.getOneTime()) {
}
}
}
ssoToken),
if (handlerObj != null) {
}
boolean bStatus =
ssoToken);
"handleFederationTermination status is : " +
bStatus);
}
return;
} else {
"handler. User account Not valid");
}
}
} else{
}
response, termDoneURL, false,
return;
} else{
return;
}
} catch(IOException e) {
e);
}
} catch(SessionException ex) {
"SessionException in doTerminationInitiation", ex);
}
}
response, termDoneURL, false,
return;
}
} // FSTerminationInitiationServlet