public Event buildAuthenticationRequestEvent(final RequestContext context) {
        val clients = new ArrayList<WsFedClient>(this.configurations.size());
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        val service = (WebApplicationService) context.getFlowScope().get(CasProtocolConstants.PARAMETER_SERVICE);
        configurations.forEach(Unchecked.consumer(cfg -> {
            val client = new WsFedClient();
            client.setName(cfg.getName());
            val id = UUID.randomUUID().toString();
            val rpId = wsFederationHelper.getRelyingPartyIdentifier(service, cfg);
            client.setAuthorizationUrl(cfg.getAuthorizationUrl(rpId, id));
            client.setReplyingPartyId(rpId);
            client.setId(id);
            client.setRedirectUrl(getRelativeRedirectUrlFor(cfg, service, request));
            client.setAutoRedirectType(cfg.getAutoRedirectType());
            clients.add(client);

            if (cfg.getAutoRedirectType() != DelegationAutoRedirectTypes.NONE) {
                DelegationWebflowUtils.putDelegatedAuthenticationProviderPrimary(context, client);
            }
        }));
        WebUtils.putWsFederationDelegatedClients(context, clients);
        return eventFactorySupport.event(this, CasWebflowConstants.TRANSITION_ID_PROCEED);
    }
Build authentication request event event.

@param context the context
@return the event
support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationRequestBuilder.java