aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_external_services.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-07-25 12:22:03 +0200
committerKim Alvefur <zash@zash.se>2020-07-25 12:22:03 +0200
commit5bc6130e57fe2af3108ec538b83768100bdc177c (patch)
tree693eac383db7a45c6f57a3b435c448d7771a694a /plugins/mod_external_services.lua
parent0b65dea7c01b57dc036de2c62de3dd8e55c3f293 (diff)
downloadprosody-5bc6130e57fe2af3108ec538b83768100bdc177c.tar.gz
prosody-5bc6130e57fe2af3108ec538b83768100bdc177c.zip
mod_external_services: Allow specifying a credential generation callback
This is especially targeted at services added via the items API. More involved credential generation should use the event hook.
Diffstat (limited to 'plugins/mod_external_services.lua')
-rw-r--r--plugins/mod_external_services.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_external_services.lua b/plugins/mod_external_services.lua
index e1c72387..7c18e326 100644
--- a/plugins/mod_external_services.lua
+++ b/plugins/mod_external_services.lua
@@ -84,7 +84,7 @@ local function prepare(item)
srv.expires = os.time() + item.ttl;
end
if (item.secret == true and default_secret) or type(item.secret) == "string" then
- local secret_cb = algorithms[item.algorithm] or algorithms[srv.type];
+ local secret_cb = item.credentials_cb or algorithms[item.algorithm] or algorithms[srv.type];
local secret = item.secret;
if secret == true then
secret = default_secret;