@ConditionalOnMissingBean(name = "yubikeyBypassEvaluator")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public MultifactorAuthenticationProviderBypassEvaluator yubikeyBypassEvaluator(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties) {
        val bypass = new DefaultChainingMultifactorAuthenticationBypassProvider(applicationContext);
        val yubikey = casProperties.getAuthn().getMfa().getYubikey();
        val currentBypassEvaluators = applicationContext.getBeansWithAnnotation(YubiKeyBypassEvaluator.class).values();
        currentBypassEvaluators
            .stream()
            .filter(BeanSupplier::isNotProxy)
            .map(MultifactorAuthenticationProviderBypassEvaluator.class::cast)
            .filter(evaluator -> !evaluator.isEmpty())
            .map(evaluator -> evaluator.belongsToMultifactorAuthenticationProvider(yubikey.getId()))
            .filter(Optional::isPresent)
            .map(Optional::get)
            .sorted(AnnotationAwareOrderComparator.INSTANCE)
            .forEach(bypass::addMultifactorAuthenticationProviderBypassEvaluator);
        return bypass;
    }
This is {@link YubiKeyAuthenticationMultifactorProviderBypassConfiguration}.

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