aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitba1834dd49c1a42e64f1b72a60a3570c8279afad (patch)
tree693eac383db7a45c6f57a3b435c448d7771a694a /plugins
parent5c4fb96e17c1d0ab96f565344799b0fb85a5e35b (diff)
downloadprosody-ba1834dd49c1a42e64f1b72a60a3570c8279afad.tar.gz
prosody-ba1834dd49c1a42e64f1b72a60a3570c8279afad.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')
-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;