@Test public void testOnAuthenticationFailure() throws IOException, ServletException { HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); AuthenticationException exception = mock(AuthenticationException.class); ajaxAuthenticationFailureHandler.onAuthenticationFailure(request, response, exception); verifyZeroInteractions(request, exception); verify(response).sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); verify(headerHandler).process(request, response); }
@Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); }
AjaxAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); } }
AjaxAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); }  }
AjaxAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); }  @Override void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception); }
AjaxAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication failed"); }  @Override void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception);  }