Skip to content
Snippets Groups Projects
Commit 76d84650 authored by Demian Katz's avatar Demian Katz
Browse files

Merge pull request #74 from KDK-Alli/auth

Fixed lightbox login at least for ChoiceAuth by including auth_method in...
parents 990e7c21 f28b825b
No related merge requests found
......@@ -98,9 +98,12 @@ function registerAjaxLogin() {
if (response.status == 'OK') {
var salt = response.data;
// get the user entered username/password
// get the user entered username/password and auth method
var password = form.password.value;
var username = form.username.value;
var auth_method = form.auth_method !== 'undefined'
? form.auth_method.value
: '';
// encrypt the password with the salt
password = rc4Encrypt(salt, password);
......@@ -113,7 +116,7 @@ function registerAjaxLogin() {
type: 'POST',
url: path + '/AJAX/JSON?method=login',
dataType: 'json',
data: {username:username, password:password},
data: {username:username, password:password, auth_method:auth_method},
success: function(response) {
if (response.status == 'OK') {
// Hide "log in" options and show "log out" options:
......
......@@ -278,9 +278,12 @@ function ajaxLogin(form) {
if (response.status == 'OK') {
var salt = response.data;
// get the user entered username/password
// get the user entered username/password and auth method
var password = form.password.value;
var username = form.username.value;
var auth_method = form.auth_method !== 'undefined'
? form.auth_method.value
: '';
// encrypt the password with the salt
password = rc4Encrypt(salt, password);
......@@ -293,7 +296,7 @@ function ajaxLogin(form) {
type: 'POST',
url: path + '/AJAX/JSON?method=login',
dataType: 'json',
data: {username:username, password:password},
data: {username:username, password:password, auth_method:auth_method},
success: function(response) {
if (response.status == 'OK') {
// Hide "log in" options and show "log out" options:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment