X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fauth%2FAbstractLoginModule.java;h=89312a3dca2d1c7c95ee0df20875c6cd42e39a0b;hb=e91af5c65a42b3ff98400caa552965cdb3f730e6;hp=baf6b63175eb3b952bedee3cca530e2d00103196;hpb=85ced0e58ded00f296948b6dff51f84994855080;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/internal/auth/AbstractLoginModule.java b/org.argeo.cms/src/org/argeo/cms/internal/auth/AbstractLoginModule.java index baf6b6317..89312a3dc 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/auth/AbstractLoginModule.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/auth/AbstractLoginModule.java @@ -161,11 +161,13 @@ public abstract class AbstractLoginModule implements LoginModule { SecurityContextHolder.getContext().setAuthentication(null); if (Display.getCurrent() != null) { HttpServletRequest httpRequest = RWT.getRequest(); - HttpSession httpSession = httpRequest.getSession(); - if (httpSession.getAttribute(SPRING_SECURITY_CONTEXT_KEY) != null) - httpSession.setAttribute(SPRING_SECURITY_CONTEXT_KEY, null); - // expire session - httpSession.setMaxInactiveInterval(0); + if (httpRequest != null) { + HttpSession httpSession = httpRequest.getSession(); + if (httpSession.getAttribute(SPRING_SECURITY_CONTEXT_KEY) != null) + httpSession.setAttribute(SPRING_SECURITY_CONTEXT_KEY, null); + // expire session + httpSession.setMaxInactiveInterval(0); + } } return true; }