Improve naming

This commit is contained in:
Daniel García Aubert
2018-02-28 19:13:49 +01:00
parent 3e0981978a
commit 62deda6470
2 changed files with 7 additions and 5 deletions
@@ -3,8 +3,10 @@
module.exports = function apikeyToken () {
return function apikeyTokenMiddleware(req, res, next) {
const apikeyCredentials = getApikeyCredentialsFromRequest(req);
res.locals.api_key = apikeyCredentials.token;
res.locals.apikeyUsername = apikeyCredentials.username;
res.locals.basicAuthUsername = apikeyCredentials.username;
return next();
};
};