@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    @ConditionalOnMissingBean(name = CasWebflowConstants.ACTION_ID_INIT_CAPTCHA)
    public Action initializeCaptchaAction(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("captchaActivationStrategy")
        final CaptchaActivationStrategy captchaActivationStrategy) {
        return WebflowActionBeanSupplier.builder()
            .withApplicationContext(applicationContext)
            .withProperties(casProperties)
            .withAction(() -> BeanSupplier.of(Action.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> new InitializeCaptchaAction(captchaActivationStrategy,
                    requestContext -> requestContext.getFlowScope().put("recaptchaLoginEnabled",
                        casProperties.getGoogleRecaptcha().isEnabled()),
                    casProperties.getGoogleRecaptcha()))
                .otherwiseProxy()
                .get())
            .withId(CasWebflowConstants.ACTION_ID_INIT_CAPTCHA)
            .build()
            .get();
    }
This is {@link CasCaptchaAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-captcha/src/main/java/org/apereo/cas/config/CasCaptchaAutoConfiguration.java