node-oauth1
Advanced tools
Comparing version 1.2.2 to 1.2.3
13
index.js
@@ -292,3 +292,3 @@ /* jshint ignore:start */ | ||
/** Construct the value of the Authorization header for an HTTP request. */ | ||
getAuthorizationHeader: function getAuthorizationHeader(realm, parameters) { | ||
getAuthorizationHeader: function getAuthorizationHeader(realm, parameters, disableParamsEncoding) { | ||
var header = 'OAuth ', | ||
@@ -298,3 +298,4 @@ headerParams = []; | ||
if (realm && realm.trim()) { | ||
headerParams.push(['realm', '"'+OAuth.percentEncode(realm)+'"'].join('=')); | ||
!disableParamsEncoding && (realm = OAuth.percentEncode(realm)); | ||
headerParams.push(`realm="${realm}"`); | ||
} | ||
@@ -315,6 +316,12 @@ | ||
if (!disableParamsEncoding) { | ||
name = OAuth.percentEncode(name); | ||
value = OAuth.percentEncode(value); | ||
} | ||
if (name.indexOf('oauth_') == 0) { | ||
headerParams.push([OAuth.percentEncode(name), '"'+OAuth.percentEncode(value)+'"'].join('=')); | ||
headerParams.push(`${name}="${value}"`); | ||
} | ||
} | ||
return header + headerParams.join(','); | ||
@@ -321,0 +328,0 @@ } |
{ | ||
"name": "node-oauth1", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A fork of Netflix's implementation of the OAuth1 protocol", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
24320
558