String redirectUrl = (String) request.getAttribute(LOGOUT_REDIRECT_ATTR);
if (StringUtils.hasLength(redirectUrl)) {
SimpleUrlLogoutSuccessHandler h = new SimpleUrlLogoutSuccessHandler();
h.setDefaultTargetUrl(redirectUrl);
h.onLogoutSuccess(request, response, authentication);
return;
}
logoutSuccessHandler.onLogoutSuccess(request, response, authentication);