@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        @ConditionalOnMissingBean(name = "groovyAuthenticationHandlerResolver")
        @ConditionalOnMissingGraalVMNativeImage
        public AuthenticationHandlerResolver groovyAuthenticationHandlerResolver(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties,
            @Qualifier(ServicesManager.BEAN_NAME)
            final ServicesManager servicesManager) throws Exception {
            return BeanSupplier.of(AuthenticationHandlerResolver.class)
                .when(BeanCondition.on("cas.authn.core.groovy-authentication-resolution.location").exists()
                    .given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val groovy = casProperties.getAuthn().getCore().getGroovyAuthenticationResolution();
                    return new GroovyAuthenticationHandlerResolver(groovy.getLocation(), servicesManager, groovy.getOrder());
                })
                .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