コード例 #1
0
 @Test
 public void testNullSecurityToken() throws Exception {
   filter.setAuthenticationHandlers(ImmutableList.<AuthenticationHandler>of(nullStHandler));
   filter.doFilter(request, recorder, chain);
   assertEquals(
       TEST_AUTH_HEADER, recorder.getHeader(AuthenticationServletFilter.WWW_AUTHENTICATE_HEADER));
 }
コード例 #2
0
 /*
  * In normal operation, this is just a pass through to the wrapped and
  * "true" AuthenticationFilter.
  *
  * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
  * javax.servlet.ServletResponse, javax.servlet.FilterChain)
  */
 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
     throws IOException, ServletException {
   if (ready) {
     delayed.doFilter(request, response, chain);
   } else {
     log.warn("received web request prior to framework being " + "fully initialized!");
     chain.doFilter(request, response);
   }
 }
コード例 #3
0
 @Test(expected = ServletException.class)
 public void testDoFilter_BadArgs() throws Exception {
   filter.doFilter(null, null, null);
 }