Skip to content
Snippets Groups Projects
Commit 55a28aa3 authored by Sebastian Knoblauch's avatar Sebastian Knoblauch
Browse files

LogoutControl Logik ist vorhanden

parent 9ca65355
No related branches found
No related tags found
No related merge requests found
...@@ -5,20 +5,17 @@ ...@@ -5,20 +5,17 @@
*/ */
package org.s4s.dao.impl; package org.s4s.dao.impl;
import com.vaadin.server.VaadinSession;
import com.vaadin.ui.UI;
/** /**
* *
* @author Sebastian * @author Sebastian
*/ */
public class LogoutControl { public class LogoutControl {
private void logout() { private void logout() {
// Close the VaadinServiceSession VaadinSession session = UI.getCurrent().getSession();
getUI().getSession().close(); session.close();
// Invalidate underlying session instead if login info is stored there
// VaadinService.getCurrentRequest().getWrappedSession().invalidate();
// Redirect to avoid keeping the removed UI open in the browser
getUI().getPage().setLocation(getLogoutPageLocation());
} }
} }
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