@ConditionalOnMissingBean(name = "multifactorAuthenticationProviderSelectionCookieGenerator")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public CasCookieBuilder multifactorAuthenticationProviderSelectionCookieGenerator(
            final ConfigurableApplicationContext applicationContext,
            @Qualifier(TenantExtractor.BEAN_NAME)
            final TenantExtractor tenantExtractor,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(CasCookieBuilder.class)
                .when(COOKIE_CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val cookie = casProperties.getAuthn().getMfa().getCore().getProviderSelection().getCookie();
                    val context = CookieUtils.buildCookieGenerationContext(cookie);
                    return new CookieRetrievingCookieGenerator(context, new NoOpCookieValueManager(tenantExtractor));
                })
                .otherwiseProxy()
                .get();
        }
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