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

@pan-os/cerberus

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pan-os/cerberus - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

index.js

@@ -21,3 +21,3 @@ /**

const registerLocalStrategy = (passport, kind) => passport.use(kind, localStrategy);
const registerLocalStrategy = (passport, kind) => (User) => passport.use(kind, localStrategy(User));

@@ -24,0 +24,0 @@ const registerFacebookStrategy = (passport) => passport.use('facebook', facebookStrategy);

{
"name": "@pan-os/cerberus",
"version": "1.0.5",
"version": "1.0.6",
"description": "security wrapper to protect routes dynamically with heimdall structure",

@@ -28,2 +28,3 @@ "main": "index.js",

"bcrypt": "^3.0.1",
"bcryptjs": "^2.4.3",
"jsonwebtoken": "^8.3.0",

@@ -30,0 +31,0 @@ "passport-facebook": "^2.1.1",

const LocalStrategy = require('passport-local').Strategy;
const { lookupUser } = require('../utils')
const localStrategy = () => new LocalStrategy({ usernameField: 'email', session: true }, lookupUser);
const localStrategy = (User) => new LocalStrategy({ usernameField: 'email', session: true }, lookupUser(User));
module.exports = localStrategy;

@@ -8,6 +8,2 @@ /* eslint-disable no-underscore-dangle */

const generateWebToken = require('../token');
/**
* Models
*/
const { User } = require('../../_models');

@@ -38,3 +34,3 @@ const authenticate = (plainPassword, user, done) => {

module.exports = (email, password, done) => User.findOne({ email }, (err, user) => {
module.exports = (email, password, done) => (User) => User.findOne({ email }, (err, user) => {
if (!user) return done(null, false, { error: new InvalidCredentialsError(err) });

@@ -41,0 +37,0 @@

const generateWebToken = require('./token');
const lookupUser = require('./auth');
const {lookupUser} = require('./auth');

@@ -4,0 +4,0 @@ module.exports = {

Sorry, the diff of this file is not supported yet

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