diff --git a/lib/sessionmanager.js b/lib/sessionmanager.js index 21989fd6..f4123def 100644 --- a/lib/sessionmanager.js +++ b/lib/sessionmanager.js @@ -32,7 +32,7 @@ SessionManager.prototype.logIn = function(req, user, options, cb) { if (err) { return cb(err); } - if (options.keepSessionData) { + if (options.keepSessionInfo) { Object.assign(req.session, prevSession); } if (!req.session[self._key]) { @@ -82,7 +82,7 @@ SessionManager.prototype.logOut = function(req, options, cb) { if (err) { return cb(err); } - if (options.keepSessionData) { + if (options.keepSessionInfo) { Object.assign(req.session, prevSession); } cb(); diff --git a/test/http/request.test.js b/test/http/request.test.js index 85c60458..d94dc9f2 100644 --- a/test/http/request.test.js +++ b/test/http/request.test.js @@ -336,7 +336,7 @@ describe('http.ServerRequest', function() { before(function(done) { var user = { id: '1', username: 'root' }; - req.login(user, { keepSessionData: true }, function(err) { + req.login(user, { keepSessionInfo: true }, function(err) { error = err; done(); }); @@ -803,7 +803,7 @@ describe('http.ServerRequest', function() { var error; before(function(done) { - req.logout({ keepSessionData: true }, function(err) { + req.logout({ keepSessionInfo: true }, function(err) { error = err; done(); });