@Override
    protected void doInitialize() {
        val duoConfig = casProperties.getAuthn().getMfa().getDuo();
        val flowRegistryBeans = duoConfig
            .stream()
            .map(duo -> {
                val duoFlowRegistry = buildDuoFlowRegistry(duo);
                val duoFlowRegistryInstance = ApplicationContextProvider.registerBeanIntoApplicationContext(
                    applicationContext, duoFlowRegistry, duo.getId());
                return Pair.of(duo.getId(), duoFlowRegistryInstance);
            })
            .toList();
        val flowRegistries = flowRegistryBeans.stream().map(Pair::getValue).toList();
        getMultifactorAuthenticationFlowDefinitionRegistries().addAll(flowRegistries);
        flowRegistryBeans.forEach(duo -> registerMultifactorProviderAuthenticationWebflow(getLoginFlow(), duo.getKey(), duo.getKey()));

        duoConfig
            .stream()
            .filter(DuoSecurityMultifactorAuthenticationProperties::isTrustedDeviceEnabled)
            .forEach(duo -> {
                val id = duo.getId();
                LOGGER.debug("Activating multifactor trusted authentication for webflow [{}]", id);
                val registry = applicationContext.getBean(id, FlowDefinitionRegistry.class);
                registerMultifactorTrustedAuthentication(registry);
            });

    }
This is {@link DuoSecurityMultifactorWebflowConfigurer}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/web/flow/DuoSecurityMultifactorWebflowConfigurer.java