aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-03-21 14:04:39 +0000
committerMatthew Wild <mwild1@gmail.com>2023-03-21 14:04:39 +0000
commit5019bacff6553fdaa8e0d9eab836c4cf83dfbe52 (patch)
tree570969e09bdb538e4ce440ddad9dee52201c1e63 /plugins
parent2c87a0108bfda1293afddaaee88059a4a7a82924 (diff)
downloadprosody-5019bacff6553fdaa8e0d9eab836c4cf83dfbe52.tar.gz
prosody-5019bacff6553fdaa8e0d9eab836c4cf83dfbe52.zip
mod_tokenauth: Log error when token validation fails
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_tokenauth.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua
index f1bd084a..16c678df 100644
--- a/plugins/mod_tokenauth.lua
+++ b/plugins/mod_tokenauth.lua
@@ -89,6 +89,7 @@ end
function get_token_info(token)
local token_id, token_user, token_host = parse_token(token);
if not token_id then
+ module:log("warn", "Failed to verify access token: %s", token_user);
return nil, "invalid-token-format";
end
return _get_parsed_token_info(token_id, token_user, token_host);
@@ -97,6 +98,7 @@ end
function get_token_session(token, resource)
local token_id, token_user, token_host = parse_token(token);
if not token_id then
+ module:log("warn", "Failed to verify access token: %s", token_user);
return nil, "invalid-token-format";
end
@@ -116,6 +118,7 @@ end
function revoke_token(token)
local token_id, token_user, token_host = parse_token(token);
if not token_id then
+ module:log("warn", "Failed to verify access token: %s", token_user);
return nil, "invalid-token-format";
end
if token_host ~= module.host then