From 3c9f23e31e4865c6a3c45aef11636c4a745225f7 Mon Sep 17 00:00:00 2001 From: Screeny Date: Fri, 15 Nov 2013 10:47:51 +0100 Subject: [PATCH] a little simpler --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index ed7dc1f..3813b1d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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'); }