When I wish to remove a user from my application, I also want to log him out (as soon as he clicks on any link). I can clear my own security context by :
SecurityContextHolder.getContext().setAuthentication(null);
but how should I clear his security context ?