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.3.0 to 2.3.1

6

CHANGES.md

@@ -0,1 +1,7 @@

2015-06-18, Version 2.3.1
=========================
* Allow checkAccessToken to a custom function (Raymond Feng)
2015-06-18, Version 2.3.0

@@ -2,0 +8,0 @@ =========================

3

lib/oauth2-loopback.js

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

var handlers = {};
app._oauth2Handlers = handlers;

@@ -831,5 +832,3 @@ // Default to true

app._oauth2Handlers = handlers;
return handlers;
};

@@ -28,3 +28,3 @@ var async = require('async')

function accessTokenValidator(req, accessToken, done) {
function checkAccessToken(accessToken, done) {
debug('Verifying access token %s', accessToken);

@@ -88,4 +88,3 @@ models.accessTokens.find(accessToken, function(err, token) {

var authInfo =
{ accessToken: token, user: user, app: app, client: app };
req.accessToken = token;
{accessToken: token, user: user, app: app, client: app};
done(null, user || {}, authInfo);

@@ -96,2 +95,16 @@ });

var verifyAccessToken = checkAccessToken;
if (typeof options.checkAccessToken === 'function') {
verifyAccessToken = options.checkAccessToken;
}
function accessTokenValidator(req, accessToken, done) {
verifyAccessToken(accessToken, function(err, user, info) {
if(!err && info) {
req.accessToken = info.accessToken;
}
done(err, user, info);
});
}
/**

@@ -98,0 +111,0 @@ * BearerStrategy

{
"name": "loopback-component-oauth2",
"version": "2.3.0",
"version": "2.3.1",
"description": "OAuth 2.0 provider for LoopBack",

@@ -51,3 +51,3 @@ "keywords": [

"optionalDependencies": {
"sl-blip": "http://blip.strongloop.com/loopback-component-oauth2@2.3.0"
"sl-blip": "http://blip.strongloop.com/loopback-component-oauth2@2.3.1"
},

@@ -54,0 +54,0 @@ "engines": {

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