FEAT: validate keys at specific URL for jibri queue
Provide region value in POST to jibri-queue service
This commit is contained in:
parent
d70f9d6fd6
commit
ad44558153
|
@ -33,6 +33,13 @@ if parentCtx == nil then
|
||||||
end
|
end
|
||||||
local token_util = module:require "token/util".new(parentCtx);
|
local token_util = module:require "token/util".new(parentCtx);
|
||||||
|
|
||||||
|
local ASAPKeyServer
|
||||||
|
= module:get_option_string("asap_key_server");
|
||||||
|
|
||||||
|
if ASAPKeyServer then
|
||||||
|
module:log("info", "ASAP Public Key URL %s", ASAPKeyServer);
|
||||||
|
token_util:set_asap_key_server(ASAPKeyServer);
|
||||||
|
end
|
||||||
|
|
||||||
local ASAPKeyPath
|
local ASAPKeyPath
|
||||||
= module:get_option_string("asap_key_path", '/etc/prosody/certs/asap.key');
|
= module:get_option_string("asap_key_path", '/etc/prosody/certs/asap.key');
|
||||||
|
@ -57,6 +64,9 @@ local ASAPKey;
|
||||||
local queueServiceURL
|
local queueServiceURL
|
||||||
= module:get_option_string("jibri_queue_url");
|
= module:get_option_string("jibri_queue_url");
|
||||||
|
|
||||||
|
local JibriRegion
|
||||||
|
= module:get_option_string("jibri_region");
|
||||||
|
|
||||||
if queueServiceURL == nil then
|
if queueServiceURL == nil then
|
||||||
log("error", "No jibri_queue_url specified. No service to contact!");
|
log("error", "No jibri_queue_url specified. No service to contact!");
|
||||||
return;
|
return;
|
||||||
|
@ -200,6 +210,7 @@ local function sendEvent(type,room_address,participant,requestId,replyIq,replyEr
|
||||||
["participant"] = participant,
|
["participant"] = participant,
|
||||||
["externalApiUrl"] = external_api_url.."/jibriqueue/update",
|
["externalApiUrl"] = external_api_url.."/jibriqueue/update",
|
||||||
["requestId"] = requestId,
|
["requestId"] = requestId,
|
||||||
|
["region"] = JibriRegion,
|
||||||
}
|
}
|
||||||
module:log("debug","Sending event %s",inspect(out_event));
|
module:log("debug","Sending event %s",inspect(out_event));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue