@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingBean(name = "groovyDelegatedClientAuthenticationCredentialResolver")
        @ConditionalOnMissingGraalVMNativeImage
        public DelegatedClientAuthenticationCredentialResolver groovyDelegatedClientAuthenticationCredentialResolver(
            final CasConfigurationProperties casProperties,
            final ConfigurableApplicationContext applicationContext,
            @Qualifier(DelegatedClientAuthenticationConfigurationContext.BEAN_NAME)
            final DelegatedClientAuthenticationConfigurationContext configContext) {
            return BeanSupplier.of(DelegatedClientAuthenticationCredentialResolver.class)
                .when(BeanCondition.on("cas.authn.pac4j.profile-selection.groovy.location")
                    .exists().given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val resource = casProperties.getAuthn().getPac4j().getProfileSelection().getGroovy().getLocation();
                    return new GroovyDelegatedClientAuthenticationCredentialResolver(configContext, resource);
                })
                .otherwiseProxy()
                .get();
        }
This is {@link DelegatedAuthenticationWebflowConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/config/DelegatedAuthenticationWebflowConfiguration.java