@Override
    public boolean update(final YubiKeyAccount account) {
        val query = new Query().addCriteria(Criteria.where(YubiKeyAccount.FIELD_USERNAME).is(account.getUsername()));
        val update = Update.update(YubiKeyAccount.FIELD_DEVICES, account.getDevices());
        this.mongoTemplate.updateFirst(query, update, MongoDbYubiKeyAccount.class, this.collectionName);
        return true;
    }
This is {@link MongoDbYubiKeyAccountRegistry}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-yubikey-mongo/src/main/java/org/apereo/cas/adaptors/yubikey/dao/MongoDbYubiKeyAccountRegistry.java