class CleanupSecurityCacheSessionListener implements HttpSessionListener {

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        if (authorizationManagers.isEmpty()) {
            return;
        }
        final User currentUser = (User) se.getSession().getAttribute(ServletSecurityAuthenticationService.USER_SESSION_ATTR_NAME);
        if (!ANONYMOUS.equals(currentUser)) {
            for (AuthorizationManager authorizationManager : authorizationManagers) {
                authorizationManager.invalidate(currentUser);
            }
        }
    }

    public  CleanupSecurityCacheSessionListener();
    @Inject public  CleanupSecurityCacheSessionListener(final Instance<AuthorizationManager> authorizationManagers);

}