summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-26 06:37:37 +0200
committerdefault <nobody@localhost>2023-04-26 06:37:37 +0200
commite2ef581e842880fb6673d22fb26d2dd329282736 (patch)
treee350f26ccf2170cdc5c6eecc48b1b0f957b5e1ef
parent9e7ace4f4ad246fe9f26dea8e0c3466f61ab8da7 (diff)
Update lastlog.txt everytime a Bearer token is validated.
-rw-r--r--mastoapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 5d508a2..3b388a4 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -786,6 +786,10 @@ int process_auth_token(snac *snac, const xs_dict *req)
if (!xs_is_null(uid) && user_open(snac, uid)) {
logged_in = 1;
+
+ /* this counts as a 'login' */
+ lastlog_write(snac);
+
srv_debug(2, xs_fmt("mastoapi auth: valid token for user %s", uid));
}
else