mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-07-21 09:38:31 +02:00
commit
f5adaa7956
@ -22,14 +22,14 @@ function authorize(options) {
|
|||||||
secret: null,
|
secret: null,
|
||||||
store: null,
|
store: null,
|
||||||
success: function(data, accept){accept(null, true)},
|
success: function(data, accept){accept(null, true)},
|
||||||
fail: function(data, message, critical, accept){accept(null, !critical)}
|
fail: function(data, message, critical, accept){accept(null, false)}
|
||||||
};
|
};
|
||||||
|
|
||||||
var auth = xtend({}, defaults, options );
|
var auth = xtend(defaults, options);
|
||||||
|
|
||||||
auth.userProperty = auth.passport._userProperty || 'user';
|
auth.userProperty = auth.passport._userProperty || 'user';
|
||||||
|
|
||||||
if (typeof auth.cookieParser === 'undefined' || !auth.cookieParser) {
|
if (!auth.cookieParser) {
|
||||||
throw new Error('cookieParser is required use connect.cookieParser or express.cookieParser');
|
throw new Error('cookieParser is required use connect.cookieParser or express.cookieParser');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "passport.socketio",
|
"name": "passport.socketio",
|
||||||
"version": "1.2.1",
|
"version": "2.1.1",
|
||||||
"description": "access passport.js authenticated user information from socket.io",
|
"description": "access passport.js authenticated user information from socket.io",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user