@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public MongoOperations mongoYubiKeyTemplate(
        @Qualifier(CasSSLContext.BEAN_NAME)
        final CasSSLContext casSslContext,
        final CasConfigurationProperties casProperties) {
        val mongo = casProperties.getAuthn().getMfa().getYubikey().getMongo();
        val factory = new MongoDbConnectionFactory(casSslContext.getSslContext());
        val mongoTemplate = factory.buildMongoTemplate(mongo);
        MongoDbConnectionFactory.createCollection(mongoTemplate, mongo.getCollection(), mongo.isDropCollection());
        return mongoTemplate;
    }
This is {@link CasMongoDbYubiKeyAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-yubikey-mongo/src/main/java/org/apereo/cas/config/CasMongoDbYubiKeyAutoConfiguration.java