Software /
code /
prosody
Diff
plugins/mod_tokenauth.lua @ 13209:c8d949cf6b09
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Jul 2023 20:49:33 +0200 |
parent | 13099:a1ba503610ed |
child | 13246:2e04d54fb013 |
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua Sun Jul 16 21:04:42 2023 +0200 +++ b/plugins/mod_tokenauth.lua Sun Jul 16 20:49:33 2023 +0200 @@ -8,7 +8,7 @@ local token_store = module:open_store("auth_tokens", "keyval+"); -local access_time_granularity = module:get_option_number("token_auth_access_time_granularity", 60); +local access_time_granularity = module:get_option_period("token_auth_access_time_granularity", 60); local function select_role(username, host, role_name) if not role_name then return end