aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-09-01 13:00:56 +0200
committerBadlop <badlop@process-one.net>2022-09-01 13:02:56 +0200
commitaaf391b284d9dbe0f86a098f52529942ec2b37a6 (patch)
tree3215d49357842b05fff66dae77badf0c3f253caa
parentThe #roster_item.ask allowed values are subscribe|undefined (diff)
Catch all errors from jose_jwt:verify and log debugging details (#3890)
-rw-r--r--src/ejabberd_auth_jwt.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ejabberd_auth_jwt.erl b/src/ejabberd_auth_jwt.erl
index f38600bc7..d1fe4d15a 100644
--- a/src/ejabberd_auth_jwt.erl
+++ b/src/ejabberd_auth_jwt.erl
@@ -146,6 +146,9 @@ check_jwt_token(User, Server, Token) ->
{false, _, _} ->
false
catch
- error:{badarg, _} ->
+ A:B ->
+ ?DEBUG("jose_jwt:verify failed ~n for account ~p@~p~n "
+ " JWK and token: ~p~n with error: ~p",
+ [User, Server, {JWK, Token}, {A, B}]),
false
end.