Comparing version 0.4.0 to 0.4.1
@@ -64,3 +64,3 @@ /** | ||
* | ||
* @param {String|Array} name | ||
* @param {Strategy|String|Array} name | ||
* @param {Object} options | ||
@@ -186,6 +186,11 @@ * @param {Function} callback | ||
// within the context of the HTTP request/response pair. | ||
var prototype = passport._strategy(layer); | ||
if (!prototype) { return next(new Error('Unknown authentication strategy "' + layer + '"')); } | ||
var strategy = Object.create(prototype); | ||
var strategy, prototype; | ||
if (typeof layer.authenticate == 'function') { | ||
strategy = layer; | ||
} else { | ||
prototype = passport._strategy(layer); | ||
if (!prototype) { return next(new Error('Unknown authentication strategy "' + layer + '"')); } | ||
strategy = Object.create(prototype); | ||
} | ||
@@ -192,0 +197,0 @@ |
{ | ||
"name": "passport", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Simple, unobtrusive authentication for Node.js.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,9 +5,2 @@ [![passport banner](http://cdn.auth0.com/img/passport-banner-github.png)](http://passportjs.org) | ||
[![Build](https://travis-ci.org/jaredhanson/passport.svg?branch=master)](https://travis-ci.org/jaredhanson/passport) | ||
[![Coverage](https://coveralls.io/repos/jaredhanson/passport/badge.svg?branch=master)](https://coveralls.io/r/jaredhanson/passport) | ||
[![Quality](https://codeclimate.com/github/jaredhanson/passport/badges/gpa.svg)](https://codeclimate.com/github/jaredhanson/passport) | ||
[![Dependencies](https://david-dm.org/jaredhanson/passport.svg)](https://david-dm.org/jaredhanson/passport) | ||
[![Tips](https://img.shields.io/gratipay/jaredhanson.svg)](https://gratipay.com/jaredhanson/) | ||
Passport is [Express](http://expressjs.com/)-compatible authentication | ||
@@ -23,2 +16,8 @@ middleware for [Node.js](http://nodejs.org/). | ||
Status: | ||
[![Build](https://travis-ci.org/jaredhanson/passport.svg?branch=master)](https://travis-ci.org/jaredhanson/passport) | ||
[![Coverage](https://coveralls.io/repos/jaredhanson/passport/badge.svg?branch=master)](https://coveralls.io/r/jaredhanson/passport) | ||
[![Dependencies](https://david-dm.org/jaredhanson/passport.svg)](https://david-dm.org/jaredhanson/passport) | ||
## Install | ||
@@ -55,3 +54,3 @@ | ||
There are 300+ strategies. Find the ones you want at: [passportjs.org](http://passportjs.org) | ||
There are 480+ strategies. Find the ones you want at: [passportjs.org](http://passportjs.org) | ||
@@ -115,3 +114,3 @@ #### Sessions | ||
Passport has a comprehensive set of **over 300** authentication strategies | ||
Passport has a comprehensive set of **over 480** authentication strategies | ||
covering social networking, enterprise integration, API services, and more. | ||
@@ -161,17 +160,2 @@ | ||
## Tests | ||
``` | ||
$ npm install | ||
$ make test | ||
``` | ||
## Credits | ||
- [Jared Hanson](http://github.com/jaredhanson) | ||
## Supporters | ||
This project is supported by ![](http://passportjs.org/images/supported_logo.svg) [Auth0](https://auth0.com) | ||
## License | ||
@@ -181,3 +165,2 @@ | ||
Copyright (c) 2011-2015 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> | ||
Copyright (c) 2011-2019 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> |
Sorry, the diff of this file is not supported yet
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
1082
46157
12
161