@Bean
    @YubiKeyBypassEvaluator
    @ConditionalOnMissingBean(name = "yubikeyPrincipalMultifactorAuthenticationProviderBypass")
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public MultifactorAuthenticationProviderBypassEvaluator yubikeyPrincipalMultifactorAuthenticationProviderBypass(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties) {
        val yubikey = casProperties.getAuthn().getMfa().getYubikey();
        val props = yubikey.getBypass();
        return BeanSupplier.of(MultifactorAuthenticationProviderBypassEvaluator.class)
            .when(StringUtils.isNotBlank(props.getPrincipalAttributeName()))
            .supply(() -> new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, yubikey.getId(), applicationContext))
            .otherwiseProxy()
            .get();
    }
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