ui: use Proxmox.Utils.setAuthData

this uses different parameters which we want to be the same for
all products (e.g. secure cookie)

leave the PBS.Utils.updateLoginData for the case that we want to do
something more here (as in pve for example)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-05-29 16:22:14 +02:00 committed by Dietmar Maurer
parent 04b0ca8b59
commit a0153b02c9

View File

@ -7,12 +7,8 @@ Ext.define('PBS.Utils', {
singleton: true, singleton: true,
updateLoginData: function(data) { updateLoginData: function(data) {
Proxmox.CSRFPreventionToken = data.CSRFPreventionToken;
Proxmox.UserName = data.username; Proxmox.Utils.setAuthData(data);
//console.log(data.ticket);
// fixme: use secure flag once we have TLS
//Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, false);
}, },
dataStorePrefix: 'DataStore-', dataStorePrefix: 'DataStore-',