Comparison

mod_auth_oauth_external/mod_auth_oauth_external.lua @ 5724:0207fd248480

mod_auth_oauth_external: Enable experimental http connection pooling Connection pooling may provide a performance boost since it does a few requests per authentication.
author Kim Alvefur <zash@zash.se>
date Sun, 12 Nov 2023 02:35:34 +0100
parent 5443:4e79f344ae2f
child 5753:6592c444e85c
comparison
equal deleted inserted replaced
5723:9de7a1b36efb 5724: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