@ConditionalOnMissingBean(name = "duoSecurityBypassEvaluator")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public ChainingMultifactorAuthenticationProviderBypassEvaluator duoSecurityBypassEvaluator(
        final CasConfigurationProperties casProperties,
        final ConfigurableApplicationContext applicationContext) {

        val duoProps = casProperties.getAuthn().getMfa().getDuo();
        val duoProviderIds = duoProps
            .stream()
            .map(BaseMultifactorAuthenticationProviderProperties::getId)
            .toList();

        val bypass = new DefaultChainingMultifactorAuthenticationBypassProvider(applicationContext);
        val currentBypassEvaluators = applicationContext.getBeansWithAnnotation(DuoSecurityBypassEvaluator.class).values();
        currentBypassEvaluators
            .stream()
            .filter(BeanSupplier::isNotProxy)
            .map(MultifactorAuthenticationProviderBypassEvaluator.class::cast)
            .filter(evaluator -> !evaluator.isEmpty())
            .filter(evaluator -> duoProviderIds.stream().anyMatch(id -> evaluator.belongsToMultifactorAuthenticationProvider(id).isPresent()))
            .sorted(AnnotationAwareOrderComparator.INSTANCE)
            .forEach(bypass::addMultifactorAuthenticationProviderBypassEvaluator);
        return bypass;
    }
This is {@link DuoSecurityMultifactorProviderBypassConfiguration}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-duo/src/main/java/org/apereo/cas/config/DuoSecurityMultifactorProviderBypassConfiguration.java