@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public YubiKeyAccountRegistry yubiKeyAccountRegistry(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("redisYubiKeyTemplate")
        final CasRedisTemplate redisYubiKeyTemplate,
        @Qualifier("yubiKeyAccountValidator")
        final YubiKeyAccountValidator yubiKeyAccountValidator,
        @Qualifier("yubikeyAccountCipherExecutor")
        final CipherExecutor yubikeyAccountCipherExecutor,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(YubiKeyAccountRegistry.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val registry = new RedisYubiKeyAccountRegistry(yubiKeyAccountValidator, redisYubiKeyTemplate,
                    casProperties.getAuthn().getMfa().getYubikey().getRedis().getScanCount());
                registry.setCipherExecutor(yubikeyAccountCipherExecutor);
                return registry;
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasRedisYubiKeyAutoConfiguration}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-yubikey-redis/src/main/java/org/apereo/cas/config/CasRedisYubiKeyAutoConfiguration.java