mod_auth_oauth_external/mod_auth_oauth_external.lua
changeset 5705 0207fd248480
parent 5447 4e79f344ae2f
child 5734 6592c444e85c
equal deleted inserted replaced
5704:9de7a1b36efb 5705:0207fd248480
    56 	end
    56 	end
    57 end
    57 end
    58 
    58 
    59 function provider.get_sasl_handler()
    59 function provider.get_sasl_handler()
    60 	local profile = {};
    60 	local profile = {};
    61 	profile.http_client = http.default; -- TODO configurable
    61 	profile.http_client = http.new({ connection_pooling = true }); -- TODO configurable
    62 	local extra = { oidc_discovery_url = oidc_discovery_url };
    62 	local extra = { oidc_discovery_url = oidc_discovery_url };
    63 	if token_endpoint and allow_plain then
    63 	if token_endpoint and allow_plain then
    64 		local map_username = function (username, _realm) return username; end; --jid.join; -- TODO configurable
    64 		local map_username = function (username, _realm) return username; end; --jid.join; -- TODO configurable
    65 		function profile:plain_test(username, password, realm)
    65 		function profile:plain_test(username, password, realm)
    66 			username = jid.unescape(username); -- COMPAT Mastodon
    66 			username = jid.unescape(username); -- COMPAT Mastodon