Benchmark for authBroker
Test plan and demo maker for authBroker and Paraffin IoT Platform. If you can run by Parse method, be sure apiserver is running.
var benchmark = require('@authbroker/mongo-benchmark')
var opts = {
type: 'parse',
parse: {
serverURL: 'http://localhost:5000/api',
appId: 'APP_ID',
javascriptKey: 'JAVASCRIPT_KEY',
masterKey: 'MASTER_KEY',
methodology: 'horizontal',
},
salt: {
iterations: 10,
hashBytes: 64,
digest: 'sha512',
salt: 'salt'
}
}
var demo = new benchmark(opts)
// print valid demo data list
console.log('print valid demo data list:')
var validData = demo.validData()
console.log(validData)
// save valid demo data to db
demo.insertValidData(function () {
demo.readData({ clientId: validData[1].clientId, realm: validData[1].realm }, function (callback) {
console.log('clientID -> ' + validData[1].clientId + ' is searching in db:')
console.log(callback)
})
})
Authors / Contributors
Copyright
MIT - Copyright (c) 2019 ioKloud