@Test public void testOnLogoutSuccess() throws IOException, ServletException { ajaxLogoutSuccessHandler.onLogoutSuccess(request, response, authentication); verify(request).getSession(); verify(httpSession).invalidate(); verify(response).setStatus(HttpServletResponse.SC_OK); verify(headerHandler).process(request, response); verify(response, never()).setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); }
@Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { if (authentication != null && authentication.getDetails() != null) { try { headerHandler.process(request, response); request.getSession().invalidate(); response.setStatus(HttpServletResponse.SC_OK); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }
AjaxLogoutSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { if (authentication != null && authentication.getDetails() != null) { try { headerHandler.process(request, response); request.getSession().invalidate(); response.setStatus(HttpServletResponse.SC_OK); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } } }
AjaxLogoutSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { if (authentication != null && authentication.getDetails() != null) { try { headerHandler.process(request, response); request.getSession().invalidate(); response.setStatus(HttpServletResponse.SC_OK); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }  }
AjaxLogoutSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { if (authentication != null && authentication.getDetails() != null) { try { headerHandler.process(request, response); request.getSession().invalidate(); response.setStatus(HttpServletResponse.SC_OK); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }  @Override void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication); }
AjaxLogoutSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { if (authentication != null && authentication.getDetails() != null) { try { headerHandler.process(request, response); request.getSession().invalidate(); response.setStatus(HttpServletResponse.SC_OK); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }  @Override void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication);  }