@passport-next/passport
Advanced tools
Comparing version 2.1.0 to 2.1.1
This changelog follows Semantic Versioning https://semver.org/ | ||
# 2.1.1 (2019-04-30) | ||
### Patch | ||
* Added gitlab sast testing @rwky | ||
* Updated npm dev deps @rwky | ||
* Updated README and CONTRIBUTING to explain differences between passport and passport-next #13 @rwky | ||
* Fixed monkey patch and memory leak #15 #9 @MayaWolf | ||
# 2.1.0 (2018-11-03) | ||
### Minor | ||
* Exposed the method to customize the SessionManager object @adamhathcock | ||
### Patch | ||
* Added node 11 support @rwky | ||
@@ -7,0 +21,0 @@ * Lint fixes @rwky |
@@ -6,6 +6,4 @@ /** | ||
const http = require('http'); | ||
const initialize = require('../middleware/initialize'); | ||
const authenticate = require('../middleware/authenticate'); | ||
const IncomingMessageExt = require('../http/request'); | ||
@@ -16,5 +14,3 @@ /** | ||
* This module provides support for using Passport with Express. It exposes | ||
* middleware that conform to the `fn(req, res, next)` signature and extends | ||
* Node's built-in HTTP request object with useful authentication-related | ||
* functions. | ||
* middleware that conform to the `fn(req, res, next)` signature. | ||
* | ||
@@ -27,5 +23,2 @@ * @return {Object} | ||
exports = module.exports = function () { | ||
// HTTP extensions. | ||
exports.__monkeypatchNode(); | ||
return { | ||
@@ -36,12 +29,1 @@ initialize, | ||
}; | ||
exports.__monkeypatchNode = function __monkeypatchNode() { | ||
http.IncomingMessage.prototype.logIn = IncomingMessageExt.logIn; | ||
http.IncomingMessage.prototype.login = http.IncomingMessage.prototype.logIn; | ||
http.IncomingMessage.prototype.logOut = IncomingMessageExt.logOut; | ||
http.IncomingMessage.prototype.logout = http.IncomingMessage.prototype.logOut; | ||
http.IncomingMessage.prototype.isAuthenticated = IncomingMessageExt.isAuthenticated; | ||
http.IncomingMessage.prototype.isUnauthenticated = IncomingMessageExt.isUnauthenticated; | ||
}; |
@@ -8,7 +8,4 @@ /** | ||
const http = require('http'); | ||
const IncomingMessageExt = require('../http/request'); | ||
const AuthenticationError = require('../errors/authenticationerror'); | ||
const connect = require('../framework/connect'); | ||
/** | ||
@@ -100,8 +97,2 @@ * Authenticates requests. | ||
return function authenticate(req, res, next) { | ||
if (http.IncomingMessage.prototype.logIn | ||
&& http.IncomingMessage.prototype.logIn !== IncomingMessageExt.logIn) { | ||
connect.__monkeypatchNode(); | ||
} | ||
// accumulator for failures from each strategy in the chain | ||
@@ -108,0 +99,0 @@ const failures = []; |
@@ -43,2 +43,4 @@ /** | ||
const IncomingMessageExt = require('../http/request'); | ||
/* eslint-disable no-proto, no-shadow */ | ||
@@ -55,4 +57,11 @@ module.exports = function initialize(passport) { | ||
req.logIn = IncomingMessageExt.logIn; | ||
req.login = IncomingMessageExt.logIn; | ||
req.logOut = IncomingMessageExt.logOut; | ||
req.logout = IncomingMessageExt.logOut; | ||
req.isAuthenticated = IncomingMessageExt.isAuthenticated; | ||
req.isUnauthenticated = IncomingMessageExt.isUnauthenticated; | ||
next(); | ||
}; | ||
}; |
{ | ||
"name": "@passport-next/passport", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Simple, unobtrusive authentication for Node.js.", | ||
@@ -35,10 +35,10 @@ "keywords": [ | ||
"devDependencies": { | ||
"make-node": "0.3.x", | ||
"mocha": "5.2.x", | ||
"chai": "4.2.x", | ||
"chai-connect-middleware": "0.3.x", | ||
"eslint-config-airbnb-base": "13.1.x", | ||
"eslint-plugin-import": "2.14.x", | ||
"eslint": "5.8.x", | ||
"@passport-next/chai-passport-strategy": "1.x.x" | ||
"@passport-next/chai-passport-strategy": "1.x.x", | ||
"chai": "4.x.x", | ||
"chai-connect-middleware": "0.x.x", | ||
"eslint": "^5.16.0", | ||
"eslint-config-airbnb-base": "13.x.x", | ||
"eslint-plugin-import": "^2.17.2", | ||
"make-node": "^0.4.6", | ||
"mocha": "6.x.x" | ||
}, | ||
@@ -45,0 +45,0 @@ "engines": { |
@@ -1,4 +0,4 @@ | ||
# Passport | ||
# Passport-Next/Passport | ||
Passport is [Express](http://expressjs.com/)-compatible authentication | ||
Passport-Next/Passport is [Express](http://expressjs.com/)-compatible authentication | ||
middleware for [Node.js](http://nodejs.org/). | ||
@@ -19,4 +19,28 @@ | ||
[![Dependencies](https://david-dm.org/passport-next/passport.png)](https://david-dm.org/passport-next/passport) | ||
<!--[![SAST](https://gitlab.com/passport-next/passport-strategy/badges/master/build.svg)](https://gitlab.com/passport-next/passport-strategy/badges/master/build.svg)--> | ||
[![SAST](https://gitlab.com/passport-next/passport/badges/master/build.svg)](https://gitlab.com/passport-next/passport/badges/master/build.svg) | ||
## Differences between passport and passport-next | ||
[Passport Next](https://github.com/passport-next) was created as a fork of the Passport repositories | ||
when the upstream repositories became stale and stopped working due to changes at the various | ||
authentication providers (e.g. Facebook API deprecation, Tumblr using HTTPS etc.) | ||
Passport Next aims to: | ||
* Keep the modules up to date with the various authentication providers | ||
* Maintain up to date dependencies | ||
* Address any security issues promptly | ||
* Ensure compatibility with the current [supported versions](https://github.com/nodejs/Release) of Node | ||
* Maintain the repositories in an organisation so maintaining isn't the responsibility of one person | ||
* Follow [Semantic Versioning](https://semver.org/) | ||
* Keep an up to date CHANGELOG.md | ||
**Passport Next does not aim to be backwards compatible with the upstream repositories. | ||
The changes required to keep up to date and functioning prohibit that so if you're migrating | ||
from the upstream modules please test your code thouroughly!** | ||
If you wish to join the team please raise an issue and one of the maintainers will assess your | ||
request. | ||
## Install | ||
@@ -23,0 +47,0 @@ |
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
50287
197
1
1119