Comparing version 0.0.1 to 0.0.2
12
index.js
@@ -1,4 +0,1 @@ | ||
var connectMongo = require('connect-mongo'), | ||
defaults = { db: 'member' }; | ||
var passport = function(req, res, next, cb) { | ||
@@ -14,3 +11,3 @@ if (req.session.user) { | ||
// middleware: check signin status | ||
exports.check = function(checking, signin) { | ||
exports.checker = function(checking, signin) { | ||
return function(req, res, next) { | ||
@@ -44,5 +41,4 @@ passport(req, res, next, function() { | ||
// middleware: session store | ||
exports.session = function(express, configs) { | ||
return new connectMongo(express)(configs && typeof(configs) == 'object' ? configs : defaults); | ||
}; | ||
// shotcuts | ||
exports.check = exports.checker(true); | ||
exports.passport = exports.checker(); |
{ | ||
"name": "member", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "a Express middleware for managing distributed user sessions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4489
38