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:
parent
e95328a516
commit
45247e0ae5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user