@Override
    public YubiKeyAccount save(final YubiKeyDeviceRegistrationRequest request, final YubiKeyRegisteredDevice... device) {
        val result = MongoDbYubiKeyAccount.builder()
            .id(System.currentTimeMillis())
            .username(request.getUsername())
            .devices(Arrays.stream(device).collect(Collectors.toList()))
            .tenant(request.getTenant())
            .build();
        return mongoTemplate.save(result, this.collectionName);
    }
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