registry-auth-token
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -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 | ||
} | ||
} |
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22450
437