node-oauth1
Advanced tools
Comparing version 1.1.1 to 1.1.2
13
index.js
@@ -293,3 +293,8 @@ /* jshint ignore:start */ | ||
getAuthorizationHeader: function getAuthorizationHeader(realm, parameters) { | ||
var header = 'OAuth realm="' + OAuth.percentEncode(realm) + '"'; | ||
var header = 'OAuth '; | ||
if (realm && realm.trim()) { | ||
header = header + 'realm="' + OAuth.percentEncode(realm) + '"'; | ||
} | ||
var list = OAuth.getParameterList(parameters); | ||
@@ -299,2 +304,8 @@ for (var p = 0; p < list.length; ++p) { | ||
var name = parameter[0]; | ||
// Skip adding params with no value | ||
if (!parameter[1] || !parameter[1].trim()) { | ||
continue; | ||
} | ||
if (name.indexOf("oauth_") == 0) { | ||
@@ -301,0 +312,0 @@ header += ',' + OAuth.percentEncode(name) + '="' + OAuth.percentEncode(parameter[1]) + '"'; |
{ | ||
"name": "node-oauth1", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A fork of Netflix's implementation of the OAuth1 protocol", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
23955
4
550