summaryrefslogtreecommitdiff
path: root/lib/web/auth/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/auth/ldap')
-rw-r--r--lib/web/auth/ldap/index.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js
index 96143664..b501106d 100644
--- a/lib/web/auth/ldap/index.js
+++ b/lib/web/auth/ldap/index.js
@@ -6,9 +6,8 @@ const LDAPStrategy = require('passport-ldapauth')
const config = require('../../../config')
const models = require('../../../models')
const logger = require('../../../logger')
-const { setReturnToFromReferer } = require('../utils')
const { urlencodedParser } = require('../../utils')
-const response = require('../../../response')
+const errors = require('../../../errors')
let ldapAuth = module.exports = Router()
@@ -81,8 +80,7 @@ passport.use(new LDAPStrategy({
}))
ldapAuth.post('/auth/ldap', urlencodedParser, function (req, res, next) {
- if (!req.body.username || !req.body.password) return response.errorBadRequest(res)
- setReturnToFromReferer(req)
+ if (!req.body.username || !req.body.password) return errors.errorBadRequest(res)
passport.authenticate('ldapauth', {
successReturnToOrRedirect: config.serverURL + '/',
failureRedirect: config.serverURL + '/',