Code example for ServletWebRequest

0
    @Override 
    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, 
            Authentication authentication) throws ServletException, IOException { 
         
        String targetUrl = request.getParameter(getTargetUrlParameter()); 
        if (BLCRequestUtils.isOKtoUseSession(new ServletWebRequest(request))) { 
            request.getSession().removeAttribute(SESSION_ATTR); 
        } 
        if (StringUtils.isNotBlank(targetUrl) && targetUrl.contains(":")) { 
            getRedirectStrategy().sendRedirect(request, response, getDefaultTargetUrl()); 
        } else { 
            super.onAuthenticationSuccess(request, response, authentication); 
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java