@ConditionalOnMissingBean(name = "mongoDbPasswordlessAuthenticationTemplate")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public MongoOperations mongoDbPasswordlessAuthenticationTemplate(
            final CasConfigurationProperties casProperties,
            @Qualifier(CasSSLContext.BEAN_NAME) final CasSSLContext casSslContext) {
            val mongo = casProperties.getAuthn().getPasswordless().getAccounts().getMongo();
            val factory = new MongoDbConnectionFactory(casSslContext.getSslContext());
            val mongoTemplate = factory.buildMongoTemplate(mongo);
            MongoDbConnectionFactory.createCollection(mongoTemplate, mongo.getCollection(), mongo.isDropCollection());
            return mongoTemplate;
        }
This is {@link CasMongoDbPasswordlessAuthenticationAutoConfiguration}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-passwordless-mongo/src/main/java/org/apereo/cas/config/CasMongoDbPasswordlessAuthenticationAutoConfiguration.java