diff options
author | Kim Alvefur <zash@zash.se> | 2023-10-09 20:31:35 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-10-09 20:31:35 +0200 |
commit | d9043249debc899bd066b932f928b7cd4062124e (patch) | |
tree | f823180f03a51c00ff28ca6d6c9bf9aded2f10da /plugins | |
parent | 0cd9aba8e27235e1bcb741d7b5f2026827923f14 (diff) | |
download | prosody-d9043249debc899bd066b932f928b7cd4062124e.tar.gz prosody-d9043249debc899bd066b932f928b7cd4062124e.zip |
mod_tokenauth: Periodically clear out expired tokens and grants
This should ensure expired grants eventually disappear.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tokenauth.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index 7bf19e9d..d4a30a96 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -341,3 +341,9 @@ function sasl_handler(auth_provider, purpose, extra) 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) |