fixed issue #64 w/ tests

This commit is contained in:
Joe Rozner
2012-06-07 10:44:54 -07:00
parent 03a82b31e4
commit d8d1e0bad7
2 changed files with 11 additions and 2 deletions

View File

@ -189,11 +189,11 @@ exports.OAuth.prototype._createSignature= function(signatureBase, tokenSecret) {
if( tokenSecret === undefined ) var tokenSecret= "";
else tokenSecret= this._encodeData( tokenSecret );
// consumerSecret is already encoded
var key= this._consumerSecret + "&" + tokenSecret;
var key= this._encodeData(this._consumerSecret) + "&" + this._encodeData(tokenSecret);
var hash= ""
if( this._signatureMethod == "PLAINTEXT" ) {
hash= this._encodeData(key);
hash= key;
}
else {
if( crypto.Hmac ) {