LP#1592565 Log successful authtoken and workstation user/berick/lp1592565-login-successs-msg
authorBill Erickson <berickxx@gmail.com>
Tue, 14 Jun 2016 20:16:08 +0000 (16:16 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 14 Jun 2016 21:07:25 +0000 (17:07 -0400)
Recover a previously existing activity log entry that logged the
username, authtoken, and workstation (when available) for successful
logins.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/c-apps/oils_auth.c

index fd9b5e7..068e0f1 100644 (file)
@@ -516,6 +516,18 @@ static oilsEvent* oilsAuthHandleLoginOK( jsonObject* userObj, const char* uname,
             jsonObjectGetKey(authEvt, "payload")   // cloned within Event
         );
 
+        osrfLogActivity(OSRF_LOG_MARK,
+            "successful login: username=%s, authtoken=%s, workstation=%s",
+            uname,
+            jsonObjectGetString(
+                jsonObjectGetKeyConst(
+                    jsonObjectGetKeyConst(authEvt, "payload"),
+                    "authtoken"
+                )
+            ),
+            workstation ? workstation : ""
+        );
+
         jsonObjectFree(authEvt);
 
     } else {