@Test public void testCommence() throws IOException, ServletException { HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); AuthenticationException authenticationException = mock(AuthenticationException.class); http401UnauthorizedEntryPoint.commence(request, response, authenticationException); verify(response).sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); verify(headerHandler).process(request, response); }
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException,ServletException { LOGGER.debug("Pre-authenticated entry point called. Rejecting access:" + request.getRequestURL()); headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); }
Http401UnauthorizedEntryPoint implements AuthenticationEntryPoint { public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException,ServletException { LOGGER.debug("Pre-authenticated entry point called. Rejecting access:" + request.getRequestURL()); headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); } }
Http401UnauthorizedEntryPoint implements AuthenticationEntryPoint { public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException,ServletException { LOGGER.debug("Pre-authenticated entry point called. Rejecting access:" + request.getRequestURL()); headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); }  }
Http401UnauthorizedEntryPoint implements AuthenticationEntryPoint { public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException,ServletException { LOGGER.debug("Pre-authenticated entry point called. Rejecting access:" + request.getRequestURL()); headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); }  void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2); }
Http401UnauthorizedEntryPoint implements AuthenticationEntryPoint { public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException,ServletException { LOGGER.debug("Pre-authenticated entry point called. Rejecting access:" + request.getRequestURL()); headerHandler.process(request, response); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied"); }  void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2);  }