@ConditionalOnMissingBean(name = MultifactorAuthenticationProviderSelector.BEAN_NAME)
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public MultifactorAuthenticationProviderSelector multifactorAuthenticationProviderSelector(
            final ConfigurableApplicationContext applicationContext,
            @Qualifier("failureModeEvaluator")
            final MultifactorAuthenticationFailureModeEvaluator failureModeEvaluator,
            final CasConfigurationProperties casProperties) {
            val mfa = casProperties.getAuthn().getMfa();
            val script = mfa.getCore().getProviderSelection().getProviderSelectorGroovyScript();
            if (script.getLocation() != null && CasRuntimeHintsRegistrar.notInNativeImage()) {
                return new GroovyScriptMultifactorAuthenticationProviderSelector(script.getLocation());
            }
            if (mfa.getCore().getProviderSelection().isProviderSelectionEnabled()) {
                return new ChainingMultifactorAuthenticationProviderSelector(applicationContext, failureModeEvaluator);
            }
            return new RankedMultifactorAuthenticationProviderSelector();
        }
This is {@link CasCoreMultifactorAuthenticationWebflowAutoConfiguration}.

@author Travis Schmidt
@since 6.0.0
core/cas-server-core-webflow-mfa/src/main/java/org/apereo/cas/config/CasCoreMultifactorAuthenticationWebflowAutoConfiguration.java