mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-07-21 09:38:31 +02:00
a little simpler
This commit is contained in:
parent
fd4214eac9
commit
3c9f23e31e
@ -25,11 +25,11 @@ function authorize(options) {
|
||||
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';
|
||||
|
||||
if (typeof auth.cookieParser === 'undefined' || !auth.cookieParser) {
|
||||
if (!auth.cookieParser) {
|
||||
throw new Error('cookieParser is required use connect.cookieParser or express.cookieParser');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user