From: erickson Date: Thu, 8 May 2008 21:31:28 +0000 (+0000) Subject: Merged revisions 9539 via svnmerge from X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fb1b1f7b5cde2a1d207f08ecdf05f1e0f66fe362;p=Evergreen.git Merged revisions 9539 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r9539 | erickson | 2008-05-08 17:31:07 -0400 (Thu, 08 May 2008) | 1 line if optional authcookie is set for the user, the login authtoken will be stored at that cookie ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9540 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/User.js b/Open-ILS/web/js/dojo/openils/User.js index 9b5e2a90a9..f189dcc470 100644 --- a/Open-ILS/web/js/dojo/openils/User.js +++ b/Open-ILS/web/js/dojo/openils/User.js @@ -41,6 +41,7 @@ if(!dojo._hasResource["openils.User"]) { this.authtime = kwargs.authtime || openils.User.authtime; this.login_type = kwargs.login_type; this.location = kwargs.location; + this.authcookie = kwargs.authcookie || openils.User.authcookie; if (this.authtoken) this.getBySession(); else if (this.id && this.authtoken) this.user = this.getById( this.id ); @@ -115,6 +116,10 @@ if(!dojo._hasResource["openils.User"]) { _u.authtime = data.payload.authtime; if (!openils.User.authtime) openils.User.authtime = _u.authtime; _u.getBySession(onComplete); + if(_u.authcookie) { + dojo.require('dojo.cookie'); + dojo.cookie(_u.authcookie, _u.authtoken); + } } authReq.send(); } @@ -151,6 +156,11 @@ if(!dojo._hasResource["openils.User"]) { if (!openils.User.authtoken) openils.User.authtoken = _u.authtoken; _u.authtime = data.payload.authtime; if (!openils.User.authtime) openils.User.authtime = _u.authtime; + + if(_u.authcookie) { + dojo.require('dojo.cookie'); + dojo.cookie(_u.authcookie, _u.authtoken); + } }, @@ -241,7 +251,7 @@ if(!dojo._hasResource["openils.User"]) { openils.User.user = null; openils.User.authtoken = null; openils.User.authtime = null; - + openils.User.authcookie = null; }