From 3d716d9ef715d3bfd70631161d022abda0467b71 Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 17 Nov 2016 12:54:21 +0100 Subject: Rename auth exports --- src/auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/auth.js') diff --git a/src/auth.js b/src/auth.js index 6ddb125..b56f09f 100644 --- a/src/auth.js +++ b/src/auth.js @@ -24,11 +24,11 @@ var LDAP_USERS_BASE_DN = process.env.LDAP_USERS_BASE_DN; if (LDAP_URL && LDAP_USERS_BASE_DN) { console.log('Enable ldap auth'); - exports.ldap = passport.authenticate('ldap'); + exports.verify = passport.authenticate('ldap'); } else { console.log('Use local user file:', LOCAL_AUTH_FILE); - exports.ldap = function (req, res, next) { + exports.verify = function (req, res, next) { var users = safe.JSON.parse(safe.fs.readFileSync(LOCAL_AUTH_FILE)); if (!users) return res.send(401); if (!users[req.query.username]) return res.send(401); -- cgit v1.2.3