/**
* 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: FSRegistrationInitiationServlet.java,v 1.7 2008/12/19 06:50:47 exu Exp $
*
*/
/**
* Initiates registration request.
*/
/**
* 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
{
}
/**
* 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
*/
{
"REGISTRATION_DONE_URL : " + REGISTRATION_DONE_URL +
"\nCOMMON_ERROR_PAGE : " + COMMON_ERROR_PAGE);
}
}
/**
* 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 registration 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;
}
}
/**
* Retrieves the session from HTTPRequest object.
* @param request HTTP request object
* @return valid session from the request object;
* <code>null</code> otherwise.
*/
"Entered FSRegistrationInitiationServlet::getValidToken");
try {
"Session is not valid redirecting for authentication");
return null;
}
return ssoToken;
} catch (SessionException e) {
return null;
}
}
/**
* Called when a registration 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 registration is initiated
* @param hostedConfig the hosted provider's extended meta
* @param hostedEntityId the hosted provider's entity id
* @param hostedRole hosted provider's role
* @param hostedProviderAlias hosted provider's meta alias
*/
private void doRegistrationInitiation(
{
"Entered FSRegistrationInitiationServlet::doRegistrationInitiation");
try {
"Provider Id not found, display error page");
return;
}
// session is valid, ProviderId available
if (instSManager != null) {
if (ssoSession != null) {
if (!ssoSession.getOneTime()) {
}
}
}
if (handlerObj != null) {
}
boolean bStatus =
"handleNameRegistration status is : " +
bStatus);
}
return;
} else {
+ "handler. User account Not valid");
}
}
}else{
}
response, REGISTRATION_DONE_URL, false,
return;
} else{
return;
}
} catch(IOException e) {
"IOException in doRegistrationInitiation:",e);
}
} catch(SessionException ex) {
"SessionException in doRegistrationInitiation", ex);
}
}
false,
}
} // FSRegistrationInitiationServlet