checklist-ninja
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -28,3 +28,3 @@ /*jshint node: true */ | ||
var parsedUrl = url.parse(resource); | ||
var str = this.config.secret + '\n' + date + '\n' + method + '\n' + parsedUrl.pathname + '\n', | ||
var str = this._config.secret + '\n' + date + '\n' + method + '\n' + parsedUrl.pathname + '\n', | ||
shasum = crypto.createHash('sha1'); // this may be okay at higher scope | ||
@@ -48,3 +48,3 @@ | ||
headers = { | ||
'authorization': 'ChecklistNinja ' + this.config.pubkey + ':' + sig, | ||
'authorization': 'ChecklistNinja ' + this._config.pubkey + ':' + sig, | ||
'date' : date | ||
@@ -51,0 +51,0 @@ }, |
{ | ||
"name": "checklist-ninja", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A Node.js client for the http://checklist.ninja API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,7 +15,7 @@ var expect = require('chai').expect, | ||
it(".sign()", function() { | ||
var config = ninja.config({secret: 'foo', pubkey:'bar', host: 'https://checklistninja.apiary-mock.com'}), | ||
signature = ninja.sign('GET', '/path/to?key=value', 'date'); | ||
expect(signature).to.equal('d0df3b47811af73aa782102c975a3c451a80e32c'); | ||
var config = ninja.config({secret: 'foo', pubkey:'bar', host: 'https://checklistninja.apiary-mock.com'}); | ||
var signature = ninja.sign('GET', '/path/to?key=value', 'date'); | ||
expect(signature).to.equal('f48c5f1951e83de09a38af69df90c4081971422b'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
19286