mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(jwt): Adds more logs when jwt is expired.
This commit is contained in:
@@ -226,7 +226,7 @@ function M.verify(token, expectedAlgo, key, acceptedIssuers, acceptedAudiences)
|
||||
|
||||
|
||||
if body.exp and os.time() >= body.exp then
|
||||
return nil, "Not acceptable by exp"
|
||||
return nil, "Not acceptable by exp ("..tostring(os.time()-body.exp)..")"
|
||||
end
|
||||
|
||||
if body.nbf and os.time() < body.nbf then
|
||||
|
||||
@@ -101,7 +101,8 @@ function provider.get_sasl_handler(session)
|
||||
local res, error, reason = token_util:process_and_verify_token(session);
|
||||
if res == false then
|
||||
module:log("warn",
|
||||
"Error verifying token err:%s, reason:%s", error, reason);
|
||||
"Error verifying token err:%s, reason:%s tenant:%s room:%s",
|
||||
error, reason, session.jitsi_web_query_prefix, session.jitsi_web_query_room);
|
||||
session.auth_token = nil;
|
||||
measure_verify_fail(1);
|
||||
return res, error, reason;
|
||||
|
||||
@@ -26,5 +26,5 @@ function init_session(event)
|
||||
end
|
||||
end
|
||||
|
||||
module:hook_global("bosh-session", init_session);
|
||||
module:hook_global("websocket-session", init_session);
|
||||
module:hook_global("bosh-session", init_session, 1);
|
||||
module:hook_global("websocket-session", init_session, 1);
|
||||
|
||||
Reference in New Issue
Block a user