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

loopback-component-oauth2

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loopback-component-oauth2 - npm Package Compare versions

Comparing version 2.0.0-beta2 to 2.0.0-beta3

18

CHANGES.md

@@ -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 @@

12

lib/index.js

@@ -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": [

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