clear-credentials-by-uri.js 423 B

12345678910111213141516
  1. var assert = require('assert')
  2. var toNerfDart = require('./nerf-dart.js')
  3. module.exports = clearCredentialsByURI
  4. function clearCredentialsByURI (uri) {
  5. assert(uri && typeof uri === 'string', 'registry URL is required')
  6. var nerfed = toNerfDart(uri)
  7. this.del(nerfed + ':_authToken', 'user')
  8. this.del(nerfed + ':_password', 'user')
  9. this.del(nerfed + ':username', 'user')
  10. this.del(nerfed + ':email', 'user')
  11. }