From d799d5420a69f3ead57ef8772e6ccb3bbdec114a Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 9 Mar 2006 15:33:13 +0000 Subject: [PATCH] new auth api git-svn-id: svn://svn.open-ils.org/ILS/trunk@3291 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/auth/session.js | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/session.js b/Open-ILS/xul/staff_client/chrome/content/auth/session.js index 2ec659091c..4e8a84f540 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/session.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/session.js @@ -24,28 +24,26 @@ auth.session.prototype = { if (init) { JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve(); - var login_type = data.tmp_login_type || 'staff'; - - var params = [ - this.view.name_prompt.value, - hex_md5( + var params = { + 'username' : this.view.name_prompt.value, + 'password' : hex_md5( init + hex_md5( this.view.password_prompt.value ) ), - login_type, - ]; + 'type' : 'opac', + }; - if (data.ws_id) { - params[3] = null; // org_id - params[4] = data.ws_id; + if (data.ws_info[ this.view.server_prompt.value ]) { + params.type = 'staff'; + params.workstation = data.ws_info[ this.view.server_prompt.value ].name; } var robj = this.network.request( api.AUTH_COMPLETE.app, api.AUTH_COMPLETE.method, - params + [ params ] ); if (robj.ilsevent == 0) { -- 2.43.2