From f9ac965e18e17b67da269e7f050c04d3945c4c94 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 27 Sep 2023 18:18:45 -0500 Subject: [PATCH] feat: Updates for jwt when room claim is not required. This allows mod_token_verification to be used with token missing room claim (firebase) and jitsi tokens with the claim. --- resources/prosody-plugins/token/util.lib.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.lua index cf1fbf1cf3..5d988b9cdc 100644 --- a/resources/prosody-plugins/token/util.lib.lua +++ b/resources/prosody-plugins/token/util.lib.lua @@ -381,7 +381,13 @@ function Util:verify_room(session, room_address) end module:log("debug", "room to check: %s", room_to_check) if not room_to_check then - return false + if not self.requireRoomClaim then + -- if we do not require to have the room claim, and it is missing + -- there is no point of continue and verifying the roomName and the tenant + return true; + end + + return false; end end