GetHttpSession.java revision 1d407e39b7d8f68d9a2b1e178f35fab037d9835a
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 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: GetHttpSession.java,v 1.5 2008/08/19 19:08:38 veiming Exp $
*
*/
/*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* This servlet class is used as a helper to aid SessionService to perform
* certain session-failover related operations:
* <ol>
* <li>Creating a new Http session
* <li>Recovering an existing Http session in case of server failover
* <li>Releasing an existing OpenAM session if it is being
* relocated to a different "owner" server
*
* Name GetHttpSession is largely a misnomer, but it was kept to minimize
* changes to other places of code/configuration This class does minimal amount
* of marshalling/unmarshalling and calls respective methods in the
* SessionService. Please see descriptions of methods in SessionService for
* explanation of logic used.
*
*/
public final class GetHttpSession extends HttpServlet {
public static final String DEREFERENCE_RESTRICTED_TOKEN_ID =
"dereference_restricted_token_id";
private final Debug sessionDebug;
private final SessionService sessionService;
private final SessionServiceConfig serviceConfig;
private final SessionCache sessionCache;
this.sessionService = sessionService;
this.sessionDebug = debug;
this.serviceConfig = serviceConfig;
this.sessionCache = sessionCache;
}
public GetHttpSession() {
}
try {
if (encryptedCookie == null) {
return false;
}
return false;
}
+ "was not part of the platformServerList");
}
return true;
} catch (Exception e) {
return false;
}
}
throws IOException {
if (!validateRequest(request)) {
return;
}
if (httpSession != null) {
if (sessionDebug.messageEnabled()) {
}
}
} else {
}
if (httpSession != null) {
if (sessionDebug.messageEnabled()) {
}
}
} else {
}
if (sessionDebug.messageEnabled()) {
}
.getOutputStream());
if (httpSession != null) {
if (sessionDebug.messageEnabled()) {
}
try {
} catch (IllegalStateException ise) {
if (sessionDebug.messageEnabled()) {
+ "shorter than the OpenSSO session timeout", ise);
}
}
} else {
if (sessionDebug.warningEnabled()) {
}
}
if (sessionDebug.messageEnabled()) {
}
} else {
if (sessionDebug.messageEnabled()) {
}
}
try {
if (sessionDebug.messageEnabled()) {
}
} else {
}
sessionDebug.error("GetHttpSession.get_restricted_token: exception occured while create token", ex);
} finally {
}
}
try {
try {
String masterSID = sessionService.deferenceRestrictedID(sessionCache.getSession(sid), restrictedID);
if (sessionDebug.messageEnabled()) {
}
} catch (SessionException se) {
"GetHttpSession.dereference_restricted_token_id: unable to find master sid", se);
}
"GetHttpSession.dereference_restricted_token_id: exception occured while finding master sid", ex);
} finally {
}
} else {
}
}
}
}