Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oauth

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth - npm Package Compare versions

Comparing version 0.9.14 to 0.9.15

examples/twitter-example.js

16

lib/oauth2.js

@@ -18,4 +18,13 @@ var querystring= require('querystring'),

this._useAuthorizationHeaderForGET= false;
}
//our agent
this._agent = undefined;
};
// Allows you to set an agent to use instead of the default HTTP or
// HTTPS agents. Useful when dealing with your own certificates.
exports.OAuth2.prototype.setAgent = function(agent) {
this._agent = agent;
};
// This 'hack' method is required for sites that don't use

@@ -133,2 +142,7 @@ // 'access_token' as the name of the access token (for requests).

//set the agent on the request options
if (this._agent) {
options.agent = this._agent;
}
var request = http_library.request(options);

@@ -135,0 +149,0 @@ request.on('response', function (response) {

8

package.json
{ "name" : "oauth"
, "description" : "Library for interacting with OAuth 1.0, 1.0A, 2 and Echo. Provides simplified client access and allows for construction of more complex apis and OAuth providers."
, "version" : "0.9.14"
, "version" : "0.9.15"
, "directories" : { "lib" : "./lib" }

@@ -14,7 +14,3 @@ , "main" : "index.js"

}
, "licenses" :
[ { "type" : "MIT"
, "url" : "http://github.com/ciaranj/node-oauth/raw/master/LICENSE"
}
]
, "license": "MIT"
}

@@ -81,2 +81,4 @@ node-oauth

==============
* 0.9.15
- OAuth2: Allow specification of agent
* 0.9.14

@@ -189,1 +191,2 @@ - OAuth2: Extend 'successful' token responses to include anything in the 2xx range.

* AJ ONeal
* Philip Skinner - https://github.com/PhilipSkinner

@@ -289,3 +289,17 @@ var vows = require('vows'),

}
},
'When specifying an agent, that agent is passed to the HTTP request method' : {
topic : new OAuth2('clientId', 'clientSecret', undefined, undefined, undefined, undefined),
'When calling _executeRequest': {
'we whould see the agent being put into the options' : function(oa) {
oa.setAgent('awesome agent');
oa._executeRequest({
request : function(options, cb) {
assert.equal(options.agent, 'awesome agent');
return new DummyRequest(new DummyResponse(200));
}
}, {}, null, function() {});
}
}
}
}).export(module);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc