Software /
code /
prosody
Changeset
13274:ddfe07041fc5
mod_tokenauth: Periodically clear out expired tokens and grants
This should ensure expired grants eventually disappear.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 09 Oct 2023 20:31:35 +0200 |
parents | 13273:a1c927323f06 |
children | 13275:5db61e0dfc62 |
files | plugins/mod_tokenauth.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua Mon Oct 16 23:51:52 2023 +0200 +++ b/plugins/mod_tokenauth.lua Mon Oct 09 20:31:35 2023 +0200 @@ -341,3 +341,9 @@ return token_user, true, token_info; end; end + +module:daily(function() + for username in token_store:items() do + get_user_grants(username); -- clears out expired grants + end +end)