@Bean
    @ConditionalOnMissingBean(name = "grouperMultifactorAuthenticationWebflowEventResolver")
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Lazy(false)
    public CasWebflowEventResolver grouperMultifactorAuthenticationWebflowEventResolver(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(CasDelegatingWebflowEventResolver.BEAN_NAME_INITIAL_AUTHENTICATION_EVENT_RESOLVER)
        final CasDelegatingWebflowEventResolver initialAuthenticationAttemptWebflowEventResolver,
        @Qualifier("grouperMultifactorAuthenticationTrigger")
        final MultifactorAuthenticationTrigger grouperMultifactorAuthenticationTrigger,
        @Qualifier(CasWebflowEventResolutionConfigurationContext.BEAN_NAME)
        final CasWebflowEventResolutionConfigurationContext casWebflowConfigurationContext) {
        return BeanSupplier.of(CasWebflowEventResolver.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val r = new DefaultMultifactorAuthenticationProviderWebflowEventResolver(
                    casWebflowConfigurationContext, grouperMultifactorAuthenticationTrigger);
                LOGGER.debug("Activating MFA event resolver based on Grouper groups...");
                initialAuthenticationAttemptWebflowEventResolver.addDelegate(r);
                return r;
            })
            .otherwiseProxy()
            .get();
    }
This is {@link GrouperMultifactorAuthenticationConfiguration}.

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