Commit 8629fa80 authored by Dietmar Maurer's avatar Dietmar Maurer

creates a session cookie (expire = null)

That way the cookie gets deleted after browser window close.
parent 14d65358
...@@ -21,8 +21,9 @@ Ext.define('PVE.Workspace', { ...@@ -21,8 +21,9 @@ Ext.define('PVE.Workspace', {
me.loginData = loginData; me.loginData = loginData;
PVE.CSRFPreventionToken = loginData.CSRFPreventionToken; PVE.CSRFPreventionToken = loginData.CSRFPreventionToken;
PVE.UserName = loginData.username; PVE.UserName = loginData.username;
var expire = Ext.Date.add(new Date(), Ext.Date.HOUR, 2); // creates a session cookie (expire = null)
Ext.util.Cookies.set('PVEAuthCookie', loginData.ticket, expire); // that way the cookie gets deleted after browser window close
Ext.util.Cookies.set('PVEAuthCookie', loginData.ticket, null, '/', null, true);
me.onLogin(loginData); me.onLogin(loginData);
}, },
......
Markdown is supported
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