[pve-devel] [PATCH 02/18] add updateLoginData to PMG.Utils

Dominik Csapak d.csapak at proxmox.com
Tue Apr 4 13:48:42 CEST 2017


we need this multiple times

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 js/Utils.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/js/Utils.js b/js/Utils.js
index 4563388..8054249 100644
--- a/js/Utils.js
+++ b/js/Utils.js
@@ -227,6 +227,12 @@ Ext.define('PMG.Utils', {
 	nw.focus();
     },
 
+    updateLoginData: function(data) {
+	Proxmox.CSRFPreventionToken = data.CSRFPreventionToken;
+	Proxmox.UserName = data.username;
+	Ext.util.Cookies.set('PMGAuthCookie', data.ticket, null, '/', null, true );
+    },
+
     constructor: function() {
 	var me = this;
 
-- 
2.11.0





More information about the pve-devel mailing list