class ChaosAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {

    @Override
    public void onAuthenticationSuccess (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) {
        ChaosWebSecurity.logSuccessfulRequest("Authentication success", httpServletRequest);
        SavedRequest request = requestCache.getRequest(httpServletRequest, httpServletResponse);
        if (request == null) {
            clearAuthenticationAttributes(httpServletRequest);
            return;
        }
        String targetUrlParameter = getTargetUrlParameter();
        if (isAlwaysUseDefaultTargetUrl() || (targetUrlParameter != null && !targetUrlParameter.isEmpty())) {
            requestCache.removeRequest(httpServletRequest, httpServletResponse);
            clearAuthenticationAttributes(httpServletRequest);
            return;
        }
        clearAuthenticationAttributes(httpServletRequest);
    }

    @Autowired public  ChaosAuthenticationSuccessHandler();
      ChaosAuthenticationSuccessHandler(HttpSessionRequestCache requestCache);

}