@Bean
        @ConditionalOnMissingBean(name = "byCredentialSourceAuthenticationHandlerResolver")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public AuthenticationHandlerResolver byCredentialSourceAuthenticationHandlerResolver(
            final ConfigurableApplicationContext applicationContext) throws Exception {
            return BeanSupplier.of(AuthenticationHandlerResolver.class)
                .when(BeanCondition.on("cas.authn.policy.source-selection-enabled").isTrue().given(applicationContext.getEnvironment()))
                .supply(ByCredentialSourceAuthenticationHandlerResolver::new)
                .otherwise(AuthenticationHandlerResolver::noOp)
                .get();
        }
This is {@link CasCoreAuthenticationSupportConfiguration}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-authentication/src/main/java/org/apereo/cas/config/CasCoreAuthenticationSupportConfiguration.java