Socket
Socket
Sign inDemoInstall

passport

Package Overview
Dependencies
2
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

16

lib/framework/connect.js

@@ -18,6 +18,6 @@ /**

*/
module.exports = function() {
exports = module.exports = function() {
// HTTP extensions.
require('../http/request');
exports.__monkeypatchNode();

@@ -29,1 +29,13 @@ return {

};
exports.__monkeypatchNode = function() {
var http = require('http');
var IncomingMessageExt = require('../http/request');
http.IncomingMessage.prototype.login
http.IncomingMessage.prototype.logIn = IncomingMessageExt.logIn;
http.IncomingMessage.prototype.logout
http.IncomingMessage.prototype.logOut = IncomingMessageExt.logOut;
http.IncomingMessage.prototype.isAuthenticated = IncomingMessageExt.isAuthenticated;
http.IncomingMessage.prototype.isUnauthenticated = IncomingMessageExt.isUnauthenticated;
};

6

lib/http/request.js
/**
* Module dependencies.
*/
var http = require('http')
, req = http.IncomingMessage.prototype;
//var http = require('http')
// , req = http.IncomingMessage.prototype;
var req = exports = module.exports = {};
/**

@@ -9,0 +11,0 @@ * Intiate a login session for `user`.

@@ -5,2 +5,3 @@ /**

var http = require('http')
, IncomingMessageExt = require('../http/request')
, AuthenticationError = require('../errors/authenticationerror');

@@ -82,2 +83,8 @@

return function authenticate(req, res, next) {
if (http.IncomingMessage.prototype.logIn
&& http.IncomingMessage.prototype.logIn !== IncomingMessageExt.logIn) {
require('../framework/connect').__monkeypatchNode();
}
// accumulator for failures from each strategy in the chain

@@ -84,0 +91,0 @@ var failures = [];

{
"name": "passport",
"version": "0.3.0",
"version": "0.3.1",
"description": "Simple, unobtrusive authentication for Node.js.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc