@ Override protected void doFilter ( final HttpServletRequest _request , final HttpServletResponse _response , final FilterChain _chain ) throws IOException , ServletException { if ( isLoggedIn ( _request ) ) { _chain . doFilter ( _request , _response ) ; } else { doAuthenticate ( _request , _response , _chain ) ; } }
If the current user is already logged in nothing is filtered .