eventlog: add logout

fixes #757
This commit is contained in:
Girish Ramakrishnan
2021-01-06 21:57:23 -08:00
parent af683b5fa4
commit 624e34d02d
5 changed files with 19 additions and 29 deletions

View File

@@ -1,11 +1,11 @@
'use strict';
exports = module.exports = {
passwordAuth: passwordAuth,
tokenAuth: tokenAuth,
passwordAuth,
tokenAuth,
authorize: authorize,
websocketAuth: websocketAuth
authorize,
websocketAuth
};
var accesscontrol = require('../accesscontrol.js'),
@@ -99,6 +99,7 @@ function tokenAuth(req, res, next) {
if (error && error.reason === BoxError.INVALID_CREDENTIALS) return next(new HttpError(401, 'Unauthorized'));
if (error) return next(new HttpError(500, error.message));
req.access_token = token; // used in logout route
req.user = user;
next();