diff options
-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 85602747..450e2f0a 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -68,6 +68,12 @@ local function _get_parsed_token_info(token_id, token_user, token_host) return nil, "not-authorized"; end + local account_info = usermanager.get_account_info(token_user, module.host); + local password_updated_at = account_info and account_info.password_updated; + if password_updated_at and password_updated_at > token_info.created then + return nil, "not-authorized"; + end + return token_info end |