Skip to content
Snippets Groups Projects
Commit 525c3f8c authored by felmer's avatar felmer
Browse files

DMC-1 Implement logout due to session timeout.

SVN: 7108
parent 07d3ed76
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,6 @@ public class DatamoverConsoleService implements IDatamoverConsoleService
if (session != null)
{
session.invalidate();
actionLog.logLogout(session);
}
}
......
/*
* Copyright 2008 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.datamover.console.server;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import ch.systemsx.cisd.common.servlet.IActionLog;
/**
*
*
* @author Franz-Josef Elmer
*/
public class LogHttpSessionListener implements HttpSessionListener
{
public void sessionCreated(HttpSessionEvent event)
{
}
public void sessionDestroyed(HttpSessionEvent event)
{
HttpSession session = event.getSession();
if (session != null)
{
ServletContext servletContext = session.getServletContext();
WebApplicationContext applicationContext =
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
IActionLog actionLog =
(IActionLog) applicationContext.getBean("action-log", IActionLog.class);
actionLog.logLogout(session);
}
}
}
......@@ -4,7 +4,7 @@
authentication-service = dummy-authentication-service
# A negative time (in minutes) indicates the session should never timeout.
session-timeout = 10
session-timeout = 1
# List of names for selectable outgoing target locations. Location syntax reads: [<host>:]<path>
targets = target1 target2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment