@ SneakyThrows protected View buildRedirectViewBackToFlow ( final String clientName , final HttpServletRequest request ) { val urlBuilder = new URIBuilder ( String . valueOf ( request . getRequestURL ( ) ) ) ; request . getParameterMap ( ) . forEach ( ( k , v ) -> { val value = request . getParameter ( k ) ; urlBuilder . addParameter ( k , value ) ; } ) ; urlBuilder . setPath ( urlBuilder . getPath ( ) . replace ( ' ' + clientName , StringUtils . EMPTY ) ) ; urlBuilder . addParameter ( Pac4jConstants . DEFAULT_CLIENT_NAME_PARAMETER , clientName ) ; val url = urlBuilder . toString ( ) ; LOGGER . debug ( "Received a response for client [{}], redirecting the login flow [{}]" , clientName , url ) ; return new RedirectView ( url ) ; }
Build redirect view back to flow view .