$25 GRAYBYTE WORDPRESS FILE MANAGER $95

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/lib/config/

HOME
Current File : /opt/alt/alt-nodejs9/root/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 = new Buffer(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.')
  }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.42 PM
root / root
0755
bin-links.js
0.699 KB
28 Sep 2021 11.28 AM
root / root
0644
clear-credentials-by-uri.js
0.413 KB
28 Sep 2021 11.28 AM
root / root
0644
cmd-list.js
1.864 KB
28 Sep 2021 11.28 AM
root / root
0644
core.js
10.976 KB
28 Sep 2021 11.28 AM
root / root
0644
defaults.js
11.12 KB
28 Sep 2021 11.28 AM
root / root
0644
fetch-opts.js
1.928 KB
28 Sep 2021 11.28 AM
root / root
0644
gentle-fs.js
0.671 KB
28 Sep 2021 11.28 AM
root / root
0644
get-credentials-by-uri.js
1.996 KB
28 Sep 2021 11.28 AM
root / root
0644
lifecycle.js
0.831 KB
28 Sep 2021 11.28 AM
root / root
0644
load-cafile.js
0.666 KB
28 Sep 2021 11.28 AM
root / root
0644
load-prefix.js
1.298 KB
28 Sep 2021 11.28 AM
root / root
0644
load-uid.js
0.377 KB
28 Sep 2021 11.28 AM
root / root
0644
nerf-dart.js
0.46 KB
28 Sep 2021 11.28 AM
root / root
0644
pacote.js
3.994 KB
28 Sep 2021 11.28 AM
root / root
0644
reg-client.js
0.77 KB
28 Sep 2021 11.28 AM
root / root
0644
set-credentials-by-uri.js
1.236 KB
28 Sep 2021 11.28 AM
root / root
0644
set-user.js
0.731 KB
28 Sep 2021 11.28 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF