@Override
    protected Event doExecuteInternal(final RequestContext requestContext) {
        if (!DelegationWebflowUtils.hasDelegatedClientAuthenticationCandidateProfile(requestContext)) {
            val key = WebUtils.getRequestParameterOrAttribute(requestContext, "key").orElseThrow();
            val candidates = DelegationWebflowUtils.getDelegatedClientAuthenticationResolvedCredentials(requestContext, DelegatedAuthenticationCandidateProfile.class);
            val credential = candidates.stream().filter(candidate -> candidate.getKey().equals(key))
                .findFirst().orElseThrow(() -> new IllegalArgumentException("Unable to locate selected profile for " + key));
            DelegationWebflowUtils.putDelegatedClientAuthenticationCandidateProfile(requestContext, credential);
        }
        return success();
    }
This is {@link DelegatedClientAuthenticationCredentialSelectionFinalizeAction}.

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