Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 836 Bytes

File metadata and controls

31 lines (24 loc) · 836 Bytes

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]'
      })