loopback-component-oauth2
Advanced tools
Comparing version 2.0.0-beta2 to 2.0.0-beta3
@@ -0,4 +1,12 @@ | ||
2015-01-08, Version 2.0.0-beta3 | ||
=============================== | ||
* Fix the oAuth2 auth middleware for an array of handlers (Raymond Feng) | ||
2015-01-07, Version 2.0.0-beta2 | ||
=============================== | ||
* v2.0.0-beta2 (Miroslav Bajtoš) | ||
* Allow declarative config of OAuth2 component (Miroslav Bajtoš) | ||
@@ -168,2 +176,6 @@ | ||
2014-01-05, Version 1.0.1 | ||
========================= | ||
* Bump version to 1.0.1. (Jared Hanson) | ||
@@ -181,2 +193,6 @@ | ||
2013-09-24, Version 1.0.0 | ||
========================= | ||
* Bump version to 1.0.0. (Jared Hanson) | ||
@@ -348,2 +364,4 @@ | ||
* Update support files. (Jared Hanson) | ||
* Port authorizationCode exchange test cases to Mocha. (Jared Hanson) | ||
@@ -350,0 +368,0 @@ |
@@ -15,5 +15,5 @@ /** | ||
exports.authenticate = function(options) { | ||
var handler; | ||
var router; | ||
return function oauth2AuthenticateHandler(req, res, next) { | ||
if (!handler) { | ||
if (!router) { | ||
var app = req.app; | ||
@@ -27,7 +27,11 @@ var authenticate = app._oauth2Handlers && app._oauth2Handlers.authenticate; | ||
handler = authenticate(options); | ||
var handlers = authenticate(options); | ||
router = app.loopback.Router(); | ||
for (var i = 0, n = handlers.length; i < n; i++) { | ||
router.use(handlers[i]); | ||
} | ||
} | ||
return handler(req, res, next); | ||
return router(req, res, next); | ||
}; | ||
} |
{ | ||
"name": "loopback-component-oauth2", | ||
"version": "2.0.0-beta2", | ||
"version": "2.0.0-beta3", | ||
"description": "OAuth 2.0 provider for LoopBack", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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
436999
3393
0