protected void handleServerAutoRedirectIfAny(final RequestContext context,
                                                 final Set<DelegatedClientIdentityProviderConfiguration> providers) {

        providers
            .stream()
            .filter(provider -> provider.getAutoRedirectType() == DelegationAutoRedirectTypes.SERVER)
            .findFirst()
            .ifPresent(Unchecked.consumer(provider -> {
                LOGGER.debug("Redirecting to [{}]", provider.getRedirectUrl());
                val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context);
                response.sendRedirect(provider.getRedirectUrl());
            }));
    }
This is {@link DelegatedAuthenticationGenerateClientsAction}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/actions/DelegatedAuthenticationGenerateClientsAction.java