Commit 86c73ab4 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

setting session lifetime in the session listener

parent 44dac4a6
......@@ -56,7 +56,6 @@ public class AuthenticationSuccessHandlerImpl implements AuthenticationSuccessHa
result.put("info", "Login successful.");
result.put("token", request.getSession().getId());
result.put("login", user.getLogin());
request.getSession().setMaxInactiveInterval(Configuration.getSessionLength());
String json = new ObjectMapper().writeValueAsString(result);
......
package lcsb.mapviewer.web.config;
import lcsb.mapviewer.common.Configuration;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
......@@ -9,7 +11,7 @@ public class SessionListener implements HttpSessionListener {
@Override
public void sessionCreated(HttpSessionEvent se) {
se.getSession().setMaxInactiveInterval(120);
se.getSession().setMaxInactiveInterval(Configuration.getSessionLength());
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment