@Override
    protected MultifactorAuthenticationTrustRecord saveInternal(final MultifactorAuthenticationTrustRecord record) {
        FunctionUtils.doIf(record.getId() < 0, __ -> record.setId(System.nanoTime())).accept(record);
        return mongoTemplate.save(record, getTrustedDevicesMultifactorProperties().getMongo().getCollection());
    }
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