Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fires event before setting username, allows listeners to override it.
damenchocc79b073f0f0
diff --git a/resources/prosody-plugins/mod_auth_token.lua b/resources/prosody-plugins/mod_auth_token.luaindex fd9b264e7d..94b065eafc 100644--- a/resources/prosody-plugins/mod_auth_token.lua+++ b/resources/prosody-plugins/mod_auth_token.lua@@ -58,7 +58,18 @@ endfunction provider.get_sasl_handler(session)local function get_username_from_token(self, message)- return token_util:process_and_verify_token(session);+ local res = token_util:process_and_verify_token(session);++ local customUsername+ = prosody.events.fire_event("pre-jitsi-authentication", session);++ if (customUsername) then+ self.username = customUsername;+ else+ self.username = message;+ end++ return res;endreturn new_sasl(host, { anonymous = get_username_from_token });@@ -73,8 +84,6 @@ local function anonymous(self, message)-- This calls the handler created in 'provider.get_sasl_handler(session)'local result, err, msg = self.profile.anonymous(self, username, self.realm);- self.username = username;-if result == true thenreturn "success";else