List of usage examples for org.springframework.security.web.authentication.logout LogoutSuccessHandler LogoutSuccessHandler
LogoutSuccessHandler
From source file:uk.co.caprica.bootlace.security.SecurityConfiguration.java
/** * Create a logout success handler.//w w w . j a v a 2 s. c o m * <p> * Simply return an appropriate response code instead of using the default handler that wants * to force a page redirect to "login?logout". * * @return logout success handler */ private LogoutSuccessHandler logoutSuccessHandler() { return new LogoutSuccessHandler() { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { response.sendError(HttpServletResponse.SC_NO_CONTENT); } }; }