login-plus 1.7.2 → 1.8.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/login-plus.js +4 -3
- package/package.json +14 -14
package/lib/login-plus.js
CHANGED
|
@@ -181,14 +181,15 @@ function checkAlreadyLoggedIn(app, opts){
|
|
|
181
181
|
loginPlus.Manager.prototype.init = function init(app,opts){
|
|
182
182
|
var thisManager = this;
|
|
183
183
|
if(!this.passport){
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
var router = '_router' in app ? app._router : app.router;
|
|
185
|
+
if(!!router){
|
|
186
|
+
var forbidensMiddlewares=router.stack.filter(function(layer){
|
|
186
187
|
return layer.name==='cookieParser';
|
|
187
188
|
});
|
|
188
189
|
if(forbidensMiddlewares.length){
|
|
189
190
|
console.log('Forbien Middlewares in login-plus:');
|
|
190
191
|
console.dir(forbidensMiddlewares);
|
|
191
|
-
throw new Error('loginPlus unexpected
|
|
192
|
+
throw new Error('loginPlus unexpected router. Check that cookie-parse was set with initCookieParse');
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
SetInitialOptions.call(this,app,opts);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "login-plus",
|
|
3
3
|
"description": "login service for express",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0-rc.1",
|
|
5
5
|
"author": "Codenautas <codenautas@googlegroups.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "codenautas/login-plus",
|
|
@@ -22,34 +22,34 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"connect-flash": "^0.1.1",
|
|
25
|
-
"express-session": "^1.18.
|
|
26
|
-
"fs-extra": "^11.
|
|
25
|
+
"express-session": "^1.18.2",
|
|
26
|
+
"fs-extra": "^11.3.0",
|
|
27
27
|
"passport": "^0.7.0",
|
|
28
28
|
"passport-local": "^1.0.0",
|
|
29
29
|
"session-file-store": "^1.5.0",
|
|
30
|
-
"best-globals": "^
|
|
30
|
+
"best-globals": "^2.0.1",
|
|
31
31
|
"ensure-login": "^0.1.5",
|
|
32
|
-
"mini-tools": "^1.
|
|
32
|
+
"mini-tools": "^1.13.4",
|
|
33
33
|
"regexplicit": "^0.1.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"body-parser": "^
|
|
36
|
+
"body-parser": "^2.2.0",
|
|
37
37
|
"concat-stream": "^2.0.0",
|
|
38
|
-
"cookie-parser": "^1.4.
|
|
38
|
+
"cookie-parser": "^1.4.7",
|
|
39
39
|
"expect.js": "^0.3.1",
|
|
40
|
-
"express": "^
|
|
40
|
+
"express": "^5.1.0",
|
|
41
41
|
"nyc": "^17.1.0",
|
|
42
42
|
"pug": "^3.0.3",
|
|
43
|
-
"mocha": "^
|
|
43
|
+
"mocha": "^11.7.1",
|
|
44
44
|
"php-session": "^0.1.0",
|
|
45
45
|
"read-yaml-promise": "^1.0.2",
|
|
46
|
-
"sinon": "^
|
|
47
|
-
"stylus": "^0.
|
|
48
|
-
"supertest": "^7.
|
|
46
|
+
"sinon": "^21.0.0",
|
|
47
|
+
"stylus": "^0.64.0",
|
|
48
|
+
"supertest": "^7.1.4",
|
|
49
49
|
"ajax-best-promise": "^0.4.2",
|
|
50
|
-
"pg-promise-strict": "^1.4.
|
|
50
|
+
"pg-promise-strict": "^1.4.3",
|
|
51
51
|
"self-explain": "^0.11.0",
|
|
52
|
-
"serve-content": "^0.
|
|
52
|
+
"serve-content": "^1.0.0"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
55
|
"php-session": "^0.1.0"
|