diff --git a/lib/oauth.js b/lib/oauth.js index 50dccf9..c4b796f 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -571,11 +571,15 @@ exports.OAuth.prototype.signUrl= function(url, oauth_token, oauth_token_secret, return parsedUrl.protocol + "//"+ parsedUrl.host + parsedUrl.pathname + "?" + query; }; -exports.OAuth.prototype.authHeader= function(url, oauth_token, oauth_token_secret, method) { +exports.OAuth.prototype.authHeader= function(url, oauth_token, oauth_token_secret, method, extra_params) { if( method === undefined ) { var method= "GET"; } - var orderedParameters= this._prepareParameters(oauth_token, oauth_token_secret, method, url, {}); + if( extra_params === undefined ) { + var extra_params= {}; + } + + var orderedParameters= this._prepareParameters(oauth_token, oauth_token_secret, method, url, extra_params); return this._buildAuthorizationHeaders(orderedParameters); };