@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public MultifactorAuthenticationTrustStorage mfaTrustEngine(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("redisMfaTrustedAuthnTemplate")
        final CasRedisTemplate<String, List<MultifactorAuthenticationTrustRecord>> redisMfaTrustedAuthnTemplate,
        @Qualifier("mfaTrustRecordKeyGenerator")
        final MultifactorAuthenticationTrustRecordKeyGenerator keyGenerationStrategy,
        @Qualifier("mfaTrustCipherExecutor")
        final CipherExecutor mfaTrustCipherExecutor) {
        return BeanSupplier.of(MultifactorAuthenticationTrustStorage.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> new RedisMultifactorAuthenticationTrustStorage(casProperties.getAuthn().getMfa().getTrusted(),
                mfaTrustCipherExecutor, redisMfaTrustedAuthnTemplate, keyGenerationStrategy))
            .otherwiseProxy()
            .get();
    }
This is {@link CasRedisMultifactorAuthenticationTrustAutoConfiguration}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-trusted-mfa-redis/src/main/java/org/apereo/cas/config/CasRedisMultifactorAuthenticationTrustAutoConfiguration.java