@medable/mdctl-credentials-provider-pouchdb
v1.0.73
Published
Medable Developer Client Tools :: PouchDB Creds Provider
Downloads
438
Keywords
Readme
mdctl-credentials-provider-pouchdb
Developer Tools Credential Provider using PouchDB for Medable
This module will let you store your credentials into PouchDB storage.
Usage
const PouchDbCredentialsProvider = require('@medable/mdctl-credentials-provider-pouchdb'),
provider = new PouchDbCredentialsProvider({
name: path.join(os.homedir(), '.medable/mdctl.db'),
key: 'whatEv3rY0uW4nt@here'
})
// clear credentials.
await provider.clear()
// add a new credential
await provider.add('env', {
apiKey: 'abcdefghijklmnopqrstuv',
username: '[email protected]',
password: 'password'
})
// get the list of credentials that matches with these filters.
await provider.list('env', {
type: 'password',
username: '[email protected]'
})