aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-03-01 13:05:17 +0000
committerMatthew Wild <mwild1@gmail.com>2023-03-01 13:05:17 +0000
commit4ce832123e0e8a0c0a0ef58391f51f864c05005a (patch)
tree9ea8f526fe2acc50ac14dc5fa8cca903c8549432 /plugins
parentb435f6d52aa7f4ca3d122bedbfbbb92b9c14ece8 (diff)
downloadprosody-4ce832123e0e8a0c0a0ef58391f51f864c05005a.tar.gz
prosody-4ce832123e0e8a0c0a0ef58391f51f864c05005a.zip
mod_auth_internal_hashed: Add oauthbearer handler to our SASL profile
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_internal_hashed.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index 0bafa23b..598934d8 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -30,6 +30,8 @@ local scram_name = "scram_"..hash_name:gsub("%-","_"):lower();
-- Default; can be set per-user
local default_iteration_count = module:get_option_number("default_iteration_count", 10000);
+local tokenauth = module:depends("tokenauth");
+
-- define auth provider
local provider = {};
@@ -178,7 +180,8 @@ function provider.get_sasl_handler()
stored_key = stored_key and from_hex(stored_key);
server_key = server_key and from_hex(server_key);
return stored_key, server_key, iteration_count, salt, not credentials.disabled;
- end
+ end;
+ oauthbearer = tokenauth.sasl_handler(provider, "oauth2", module:shared("tokenauth/oauthbearer_config"));
};
return new_sasl(host, testpass_authentication_profile);
end