private void configureIndexes(final MongoOperations mongoTemplate) {
        /*
            Expire at zero indicates the entity will expire at the exact date provided in the field
         */
        val expirationDateIndex = new Index().on("expirationDate", Sort.Direction.ASC).expire(0);
        val collection = mongoTemplate.getCollection(getTrustedDevicesMultifactorProperties().getMongo().getCollection());
        MongoDbConnectionFactory.createOrUpdateIndexes(mongoTemplate, collection, List.of(expirationDateIndex));
    }
This is {@link MongoDbMultifactorAuthenticationTrustStorage}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-trusted-mfa-mongo/src/main/java/org/apereo/cas/trusted/authentication/storage/MongoDbMultifactorAuthenticationTrustStorage.java