a little simpler

This commit is contained in:
Screeny 2013-11-15 10:47:51 +01:00
parent fd4214eac9
commit 3c9f23e31e

View File

@ -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');
}