From 7da3c912899130a35fea0358fbe94bcc172f7fe0 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Mon, 14 Jul 2014 16:07:42 +0900 Subject: [PATCH] Separate ldap and mock auth endpoints for potentially increased loadbalancer friendliness. --- lib/roles/auth/ldap.js | 2 +- lib/roles/auth/mock.js | 2 +- res/auth-ldap/scripts/controllers/SignInCtrl.js | 2 +- res/auth-mock/scripts/controllers/SignInCtrl.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/roles/auth/ldap.js b/lib/roles/auth/ldap.js index 864a7907..2acab04d 100644 --- a/lib/roles/auth/ldap.js +++ b/lib/roles/auth/ldap.js @@ -67,7 +67,7 @@ module.exports = function(options) { res.render('index') }) - app.post('/api/v1/auth', function(req, res) { + app.post('/api/v1/auth/ldap', function(req, res) { var log = logger.createLogger('auth-ldap') log.setLocalIdentifier(req.ip) switch (req.accepts(['json'])) { diff --git a/lib/roles/auth/mock.js b/lib/roles/auth/mock.js index e34d3822..bc9974b4 100644 --- a/lib/roles/auth/mock.js +++ b/lib/roles/auth/mock.js @@ -66,7 +66,7 @@ module.exports = function(options) { res.render('index') }) - app.post('/api/v1/auth', function(req, res) { + app.post('/api/v1/auth/mock', function(req, res) { var log = logger.createLogger('auth-mock') log.setLocalIdentifier(req.ip) switch (req.accepts(['json'])) { diff --git a/res/auth-ldap/scripts/controllers/SignInCtrl.js b/res/auth-ldap/scripts/controllers/SignInCtrl.js index 0e327f2b..9218ca17 100644 --- a/res/auth-ldap/scripts/controllers/SignInCtrl.js +++ b/res/auth-ldap/scripts/controllers/SignInCtrl.js @@ -8,7 +8,7 @@ define(['./module'], function(mod) { , password: $scope.signin.password.$modelValue } $scope.invalid = false - $http.post('/api/v1/auth', data) + $http.post('/api/v1/auth/ldap', data) .success(function(response) { $scope.error = null location.replace(response.redirect) diff --git a/res/auth-mock/scripts/controllers/SignInCtrl.js b/res/auth-mock/scripts/controllers/SignInCtrl.js index 3a525b96..7df60837 100644 --- a/res/auth-mock/scripts/controllers/SignInCtrl.js +++ b/res/auth-mock/scripts/controllers/SignInCtrl.js @@ -8,7 +8,7 @@ define(['./module'], function(mod) { , email: $scope.signin.email.$modelValue } $scope.invalid = false - $http.post('/api/v1/auth', data) + $http.post('/api/v1/auth/mock', data) .success(function(response) { $scope.error = null location.replace(response.redirect)