summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2023-04-26 06:37:37 +0200
committerGravatar default2023-04-26 06:37:37 +0200
commite2ef581e842880fb6673d22fb26d2dd329282736 (patch)
treee350f26ccf2170cdc5c6eecc48b1b0f957b5e1ef /mastoapi.c
parentUpdated README. (diff)
downloadsnac2-e2ef581e842880fb6673d22fb26d2dd329282736.tar.gz
snac2-e2ef581e842880fb6673d22fb26d2dd329282736.tar.xz
snac2-e2ef581e842880fb6673d22fb26d2dd329282736.zip
Update lastlog.txt everytime a Bearer token is validated.
Diffstat (limited to 'mastoapi.c')
-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)
786 786
787 if (!xs_is_null(uid) && user_open(snac, uid)) { 787 if (!xs_is_null(uid) && user_open(snac, uid)) {
788 logged_in = 1; 788 logged_in = 1;
789
790 /* this counts as a 'login' */
791 lastlog_write(snac);
792
789 srv_debug(2, xs_fmt("mastoapi auth: valid token for user %s", uid)); 793 srv_debug(2, xs_fmt("mastoapi auth: valid token for user %s", uid));
790 } 794 }
791 else 795 else