LP#1592565 Log successful authtoken and workstation
[Evergreen.git] / 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 {