destroy session after logout

This commit is contained in:
Sebastian Sdorra
2011-01-08 16:10:06 +01:00
parent 37a9c506d9
commit 3c066319dd

View File

@@ -56,6 +56,7 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/** /**
* *
@@ -178,6 +179,13 @@ public class BasicSecurityContext implements WebSecurityContext
{ {
user = null; user = null;
groups = new HashSet<String>(); groups = new HashSet<String>();
HttpSession session = request.getSession(false);
if (session != null)
{
session.invalidate();
}
} }
//~--- get methods ---------------------------------------------------------- //~--- get methods ----------------------------------------------------------