Socket
Socket
Sign inDemoInstall

registry-auth-token

Package Overview
Dependencies
5
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.1.0

1

CHANGELOG.md

@@ -57,1 +57,2 @@ # Change Log

[3.0.0]: https://github.com/rexxars/registry-auth-token/compare/v2.1.1...v3.0.0
[3.0.1]: https://github.com/rexxars/registry-auth-token/compare/v3.0.0...v3.0.1

@@ -86,3 +86,8 @@ var url = require('url')

// we found a basicToken token so let's exit the loop
return {token: token, type: 'Basic'}
return {
token: token,
type: 'Basic',
password: pass,
username: username
}
}

2

package.json
{
"name": "registry-auth-token",
"version": "3.0.1",
"version": "3.1.0",
"description": "Get the auth token set for an npm registry (if any)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -212,3 +212,8 @@ var fs = require('fs')

var token = getAuthToken()
assert.deepEqual(token, {token: 'Zm9vYmFyOmZvb2Jhcg==', type: 'Basic'})
assert.deepEqual(token, {
token: 'Zm9vYmFyOmZvb2Jhcg==',
type: 'Basic',
username: 'foobar',
password: 'foobar'
})
assert.equal(decodeBase64(token.token), 'foobar:foobar')

@@ -232,3 +237,8 @@ done()

var token = getAuthToken()
assert.deepEqual(token, {token: 'Zm9vYmFyOmZvb2Jhcg==', type: 'Basic'})
assert.deepEqual(token, {
token: 'Zm9vYmFyOmZvb2Jhcg==',
type: 'Basic',
username: 'foobar',
password: 'foobar'
})
assert.equal(decodeBase64(token.token), 'foobar:foobar')

@@ -250,3 +260,8 @@ done()

var token = getAuthToken()
assert.deepEqual(token, {token: 'YmFyYmF6OmJhcmJheQ==', type: 'Basic'})
assert.deepEqual(token, {
token: 'YmFyYmF6OmJhcmJheQ==',
type: 'Basic',
password: 'barbay',
username: 'barbaz'
})
assert.equal(decodeBase64(token.token), 'barbaz:barbay')

@@ -269,3 +284,8 @@ done()

var token = getAuthToken('//registry.blah.foo')
assert.deepEqual(token, {token: 'YmFyYmF6OmJhcmJheQ==', type: 'Basic'})
assert.deepEqual(token, {
token: 'YmFyYmF6OmJhcmJheQ==',
type: 'Basic',
password: 'barbay',
username: 'barbaz'
})
assert.equal(decodeBase64(token.token), 'barbaz:barbay')

@@ -289,6 +309,16 @@ done()

var token = getAuthToken('https://registry.blah.com/foo/bar/baz', opts)
assert.deepEqual(token, {token: 'YmFyYmF6OmJhcmJheQ==', type: 'Basic'})
assert.deepEqual(token, {
token: 'YmFyYmF6OmJhcmJheQ==',
type: 'Basic',
password: 'barbay',
username: 'barbaz'
})
assert.equal(decodeBase64(token.token), 'barbaz:barbay')
token = getAuthToken('https://registry.blah.eu/foo/bar/baz', opts)
assert.deepEqual(token, {token: 'YmFyYmF6OmZvb2Jheg==', type: 'Basic'})
assert.deepEqual(token, {
token: 'YmFyYmF6OmZvb2Jheg==',
type: 'Basic',
password: 'foobaz',
username: 'barbaz'
})
assert.equal(decodeBase64(token.token), 'barbaz:foobaz')

@@ -295,0 +325,0 @@ assert.equal(getAuthToken('//some.registry', opts), undef)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc