PATH:
opt
/
alt
/
alt-nodejs9
/
root
/
usr
/
lib
/
node_modules
/
npm
/
node_modules.bundled
/
npm-registry-client
/
lib
module.exports = authify function authify (authed, parsed, headers, credentials) { if (credentials && credentials.otp) { this.log.verbose('request', 'passing along npm otp') headers['npm-otp'] = credentials.otp } if (credentials && credentials.token) { this.log.verbose('request', 'using bearer token for auth') headers.authorization = 'Bearer ' + credentials.token return null } if (authed) { if (credentials && credentials.username && credentials.password) { var username = encodeURIComponent(credentials.username) var password = encodeURIComponent(credentials.password) parsed.auth = username + ':' + password } else { return new Error( 'This request requires auth credentials. Run `npm login` and repeat the request.' ) } } }
[-] org.js
[edit]
[-] get.js
[edit]
[-] whoami.js
[edit]
[-] unpublish.js
[edit]
[-] star.js
[edit]
[-] team.js
[edit]
[-] request.js
[edit]
[-] deprecate.js
[edit]
[-] fetch.js
[edit]
[-] ping.js
[edit]
[-] publish.js
[edit]
[+]
..
[-] initialize.js
[edit]
[-] tag.js
[edit]
[-] send-anonymous-CLI-metrics.js
[edit]
[-] stars.js
[edit]
[-] authify.js
[edit]
[-] attempt.js
[edit]
[-] access.js
[edit]
[+]
dist-tags
[-] adduser.js
[edit]
[-] logout.js
[edit]