fixing up auth code to correctly record the session from the new return style
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Dec 2005 17:03:57 +0000 (17:03 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Dec 2005 17:03:57 +0000 (17:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2445 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/templates/login.ttk

index f03b526..bd60494 100644 (file)
                        var seed = init_request.getResultObject();
                        
                        if( ! seed || seed == '0') {
-                       alert( "Error Communicating with Authentication Server" );
-                       return null;
+                               alert( "Error Communicating with Authentication Server" );
+                               return null;
                        }
                        
                        var auth_request = new RemoteRequest( 
                                        "open-ils.auth", "open-ils.auth.authenticate.complete",
-                       uname, hex_md5(seed + hex_md5(passwd)), "staff");
+                                       uname, hex_md5(seed + hex_md5(passwd)), "staff");
                        
                        auth_request.send(true);
-                       var auth_result = auth_request.getResultObject();
+                       var auth_result = auth_request.getResultObject().payload.authtoken;
                        
                        if(auth_result == '0' || auth_result == null || auth_result.length == 0) { 
                                        alert("Login failed");