Commit 7a2a20d1 by Ben Drucker

Merge branch 'auth-fix'

* auth-fix: Update test for fixed basic auth header Fix auth
parents 4cefeda2 2057bb6a
...@@ -60,6 +60,7 @@ ClearbitClient.prototype.request = function (options) { ...@@ -60,6 +60,7 @@ ClearbitClient.prototype.request = function (options) {
{ {
timeout: options.stream ? 60000 : 5000, timeout: options.stream ? 60000 : 5000,
username: this.key, username: this.key,
password: '',
user_agent: 'ClearbitNode/v' + pkg.version user_agent: 'ClearbitNode/v' + pkg.version
} }
) )
......
...@@ -118,7 +118,7 @@ describe('Client', function () { ...@@ -118,7 +118,7 @@ describe('Client', function () {
it('sends a basic auth header', function () { it('sends a basic auth header', function () {
mock mock
.get('/v1/people/email/bvdrucker@gmail.com') .get('/v1/people/email/bvdrucker@gmail.com')
.matchHeader('Authorization', 'Basic aw==') .matchHeader('Authorization', 'Basic azo=')
.reply(202); .reply(202);
return client.request({ return client.request({
api: 'person', api: 'person',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment