FEAT: support updating accepted issuer/aud for token lib

This commit is contained in:
Aaron van Meerten 2020-08-10 15:21:31 -05:00
parent c4155575f9
commit 6fc9606c0d
2 changed files with 22 additions and 2 deletions

View File

@ -51,7 +51,19 @@ local ASAPIssuer
= module:get_option_string("asap_issuer", 'jitsi');
local ASAPAudience
= module:get_option_string("asap_audience", 'jitsi');
= module:get_option_string("asap_audience", 'jibri-queue');
local ASAPAcceptedIssuers
= module:get_option_array('asap_accepted_issuers',{'jibri-queue'});
module:log("info", "ASAP Accepted Issuers %s", ASAPAcceptedIssuers);
token_util:set_asap_accepted_issuers(ASAPAcceptedIssuers);
local ASAPAcceptedAudiences
= module:get_option_array('asap_accepted_audiences',{'*'});
module:log("info", "ASAP Accepted Audiences %s", ASAPAcceptedAudiences);
token_util:set_asap_accepted_audiences(ASAPAcceptedAudiences);
local ASAPTTL
= module:get_option_number("asap_ttl", 3600);

View File

@ -101,7 +101,15 @@ function Util.new(module)
end
function Util:set_asap_key_server(asapKeyServer)
self.asapKeyServer = asapKeyServer
self.asapKeyServer = asapKeyServer;
end
function Util:set_asap_accepted_issuers(acceptedIssuers)
self.acceptedIssuers = acceptedIssuers;
end
function Util:set_asap_accepted_audiences(acceptedAudiences)
self.acceptedAudiences = acceptedAudiences;
end
--- Returns the public key by keyID