Changeset 9539

Show
Ignore:
Timestamp:
05/08/08 17:31:07 (1 week ago)
Author:
erickson
Message:

if optional authcookie is set for the user, the login authtoken will be stored at that cookie

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Open-ILS/web/js/dojo/openils/User.js

    r9535 r9539  
    4242            this.login_type = kwargs.login_type; 
    4343            this.location = kwargs.location; 
     44            this.authcookie = kwargs.authcookie || openils.User.authcookie; 
    4445 
    4546            if (this.authtoken) this.getBySession(); 
     
    116117                                        if (!openils.User.authtime) openils.User.authtime = _u.authtime; 
    117118                    _u.getBySession(onComplete); 
     119                    if(_u.authcookie) { 
     120                        dojo.require('dojo.cookie'); 
     121                        dojo.cookie(_u.authcookie, _u.authtoken); 
     122                    } 
    118123                } 
    119124                authReq.send(); 
     
    152157            _u.authtime = data.payload.authtime; 
    153158            if (!openils.User.authtime) openils.User.authtime = _u.authtime; 
     159 
     160            if(_u.authcookie) { 
     161                dojo.require('dojo.cookie'); 
     162                dojo.cookie(_u.authcookie, _u.authtoken); 
     163            } 
    154164        }, 
    155165 
     
    242252        openils.User.authtoken = null; 
    243253        openils.User.authtime = null; 
    244  
     254    openils.User.authcookie = null; 
    245255} 
    246256