1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

Fix sunstone remote_auth login

This commit is contained in:
lsimngar 2016-08-26 15:56:23 +02:00
parent e95328a516
commit 45247e0ae5

View File

@ -35,11 +35,12 @@ define(function(require) {
type: "POST",
data: {remember: remember},
beforeSend : function(req) {
var token = username + ':' + password;
var authString = 'Basic ';
authString += btoa(unescape(encodeURIComponent(token)));
req.setRequestHeader("Authorization", authString);
if (username && password) {
var token = username + ':' + password;
var authString = 'Basic ';
authString += btoa(unescape(encodeURIComponent(token)));
req.setRequestHeader("Authorization", authString);
}
},
success: function(response) {
return callback ? callback(request, response) : null;