diff --git a/lib/expressapp.js b/lib/expressapp.js index 508acfc..1c50e53 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -564,6 +564,24 @@ ExpressApp.prototype.start = function(opts, cb) { res.end(); }); + router.post('/v1/login/', function(req, res) { + getServerWithAuth(req, res, function(server) { + server.login({}, function(err, session) { + if (err) return returnError(err, res, req); + res.json(session); + }); + }); + }); + + router.post('/v1/logout/', function(req, res) { + getServerWithAuth(req, res, function(server) { + server.logout({}, function(err) { + if (err) return returnError(err, res, req); + res.end(); + }); + }); + }); + router.get('/v1/notifications/', function(req, res) { getServerWithAuth(req, res, { allowSession: true,