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)}
|
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user