hawk
Advanced tools
Comparing version 0.12.1 to 0.12.2
@@ -271,3 +271,3 @@ /* | ||
var hash = CryptoJS[credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n'); | ||
var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key); | ||
return hash.toString(CryptoJS.enc.Base64); | ||
@@ -274,0 +274,0 @@ } |
@@ -0,0 +0,0 @@ // Load modules |
@@ -94,6 +94,6 @@ // Load modules | ||
var hash = Crypto.createHash(credentials.algorithm); | ||
hash.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); | ||
return hash.digest('base64'); | ||
var hmac = Crypto.createHmac(credentials.algorithm, credentials.key); | ||
hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); | ||
return hmac.digest('base64'); | ||
}; | ||
@@ -0,0 +0,0 @@ // Export sub-modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -168,1 +168,8 @@ // Load modules | ||
}; | ||
exports.unauthorized = function (message) { | ||
return Boom.unauthorized(message, 'Hawk'); | ||
}; | ||
{ | ||
"name": "hawk", | ||
"description": "HTTP Hawk Authentication Scheme", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors": [], |
@@ -0,0 +0,0 @@ ![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png) |
@@ -0,0 +0,0 @@ // Load modules |
@@ -70,2 +70,11 @@ // Load modules | ||
}); | ||
describe('#unauthorized', function () { | ||
it('returns a hawk 401', function (done) { | ||
expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
@@ -72,0 +81,0 @@ }); |
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
260270
3001