aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJohannes <johannes@cloudron.io>2016-11-17 12:54:21 +0100
committerJohannes <johannes@cloudron.io>2016-11-17 12:54:21 +0100
commit3d716d9ef715d3bfd70631161d022abda0467b71 (patch)
treed831396e73b3d4e5d96bbd30b8468fc621bd5650 /src
parentf9f5c021adfc209eb095e682292db5e1ccdd272c (diff)
downloadSurfer-3d716d9ef715d3bfd70631161d022abda0467b71.tar.gz
Surfer-3d716d9ef715d3bfd70631161d022abda0467b71.tar.zst
Surfer-3d716d9ef715d3bfd70631161d022abda0467b71.zip
Rename auth exports
Diffstat (limited to 'src')
-rw-r--r--src/auth.js4
1 files changed, 2 insertions, 2 deletions
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;
24if (LDAP_URL && LDAP_USERS_BASE_DN) { 24if (LDAP_URL && LDAP_USERS_BASE_DN) {
25 console.log('Enable ldap auth'); 25 console.log('Enable ldap auth');
26 26
27 exports.ldap = passport.authenticate('ldap'); 27 exports.verify = passport.authenticate('ldap');
28} else { 28} else {
29 console.log('Use local user file:', LOCAL_AUTH_FILE); 29 console.log('Use local user file:', LOCAL_AUTH_FILE);
30 30
31 exports.ldap = function (req, res, next) { 31 exports.verify = function (req, res, next) {
32 var users = safe.JSON.parse(safe.fs.readFileSync(LOCAL_AUTH_FILE)); 32 var users = safe.JSON.parse(safe.fs.readFileSync(LOCAL_AUTH_FILE));
33 if (!users) return res.send(401); 33 if (!users) return res.send(401);
34 if (!users[req.query.username]) return res.send(401); 34 if (!users[req.query.username]) return res.send(401);