+ if (SecurityContextHolder.getContext().getAuthentication() == null) {
+ SecurityContext contextFromSessionObject = (SecurityContext) RWT
+ .getRequest().getSession()
+ .getAttribute(SPRING_SECURITY_CONTEXT_KEY);
+ if (contextFromSessionObject != null)
+ SecurityContextHolder.setContext(contextFromSessionObject);
+ else
+ logAsAnonymous();
+ }