1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

Separate ldap and mock auth endpoints for potentially increased loadbalancer friendliness.

This commit is contained in:
Simo Kinnunen 2014-07-14 16:07:42 +09:00
parent 8a4f424d75
commit 7da3c91289
4 changed files with 4 additions and 4 deletions

View file

@ -67,7 +67,7 @@ module.exports = function(options) {
res.render('index') 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') var log = logger.createLogger('auth-ldap')
log.setLocalIdentifier(req.ip) log.setLocalIdentifier(req.ip)
switch (req.accepts(['json'])) { switch (req.accepts(['json'])) {

View file

@ -66,7 +66,7 @@ module.exports = function(options) {
res.render('index') 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') var log = logger.createLogger('auth-mock')
log.setLocalIdentifier(req.ip) log.setLocalIdentifier(req.ip)
switch (req.accepts(['json'])) { switch (req.accepts(['json'])) {

View file

@ -8,7 +8,7 @@ define(['./module'], function(mod) {
, password: $scope.signin.password.$modelValue , password: $scope.signin.password.$modelValue
} }
$scope.invalid = false $scope.invalid = false
$http.post('/api/v1/auth', data) $http.post('/api/v1/auth/ldap', data)
.success(function(response) { .success(function(response) {
$scope.error = null $scope.error = null
location.replace(response.redirect) location.replace(response.redirect)

View file

@ -8,7 +8,7 @@ define(['./module'], function(mod) {
, email: $scope.signin.email.$modelValue , email: $scope.signin.email.$modelValue
} }
$scope.invalid = false $scope.invalid = false
$http.post('/api/v1/auth', data) $http.post('/api/v1/auth/mock', data)
.success(function(response) { .success(function(response) {
$scope.error = null $scope.error = null
location.replace(response.redirect) location.replace(response.redirect)