Skip to content

Commit d01e45a

Browse files
committed
Fix for authHeader not including extra params
Ref: ciaranj#366
1 parent 0749d67 commit d01e45a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/oauth.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,15 @@ exports.OAuth.prototype.signUrl= function(url, oauth_token, oauth_token_secret,
571571
return parsedUrl.protocol + "//"+ parsedUrl.host + parsedUrl.pathname + "?" + query;
572572
};
573573

574-
exports.OAuth.prototype.authHeader= function(url, oauth_token, oauth_token_secret, method) {
574+
exports.OAuth.prototype.authHeader= function(url, oauth_token, oauth_token_secret, method, extra_params) {
575575
if( method === undefined ) {
576576
var method= "GET";
577577
}
578578

579-
var orderedParameters= this._prepareParameters(oauth_token, oauth_token_secret, method, url, {});
579+
if( extra_params === undefined ) {
580+
var extra_params= {};
581+
}
582+
583+
var orderedParameters= this._prepareParameters(oauth_token, oauth_token_secret, method, url, extra_params);
580584
return this._buildAuthorizationHeaders(orderedParameters);
581585
};

0 commit comments

Comments
 (0)