Software / code / prosody-modules
Comparison
mod_auth_oauth_external/mod_auth_oauth_external.lua @ 5977:97a9f939d472
mod_auth_oauth_external: Inherit default HTTP client settings (thanks nils)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 07 Aug 2024 17:59:14 +0200 |
| parent | 5753:6592c444e85c |
comparison
equal
deleted
inserted
replaced
| 5976:8ac59766ece1 | 5977:97a9f939d472 |
|---|---|
| 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.new({ connection_pooling = true }); -- TODO configurable | 61 profile.http_client = http.default: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 |