protected void preventSessionFixation(Connection connection, UserSession userSession) { if (connection.isAuthenticated() && !isLoggedInWithExternalAuth(userSession) && webConfig.getUseSessionFixationProtection() && VaadinService.getCurrentRequest() != null) { VaadinService.reinitializeSession(VaadinService.getCurrentRequest()); WrappedSession session = VaadinSession.getCurrent().getSession(); int timeout = webConfig.getHttpSessionExpirationTimeoutSec(); session.setMaxInactiveInterval(timeout); HttpSession httpSession = session instanceof WrappedHttpSession ? ((WrappedHttpSession) session).getHttpSession() : null; log.debug("Session reinitialized: HttpSession={}, timeout={}sec, UserSession={}", httpSession, timeout, connection.getSession()); } }
5000, TimeUnit.MILLISECONDS); setPollInterval(1000); getSession().getSession().setMaxInactiveInterval(30); addDetachListener((DetachListener) detachEvent -> { log.warn("Closing UI");
wrappedSession.setMaxInactiveInterval(webConfig.getHttpSessionExpirationTimeoutSec());