aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_tokenauth.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-02-28 14:13:04 +0100
committerKim Alvefur <zash@zash.se>2020-02-28 14:13:04 +0100
commitd9782e12a3a1915a0f5ee6508194dca204530b7f (patch)
tree6921061774f895e3f5db01bb97c62584b47c4455 /plugins/mod_tokenauth.lua
parent6932bf9c38bddd91c031e6a1e4dd1cd66c5c323e (diff)
downloadprosody-d9782e12a3a1915a0f5ee6508194dca204530b7f.tar.gz
prosody-d9782e12a3a1915a0f5ee6508194dca204530b7f.zip
mod_tokenauth: Handle tokens issued to bare hosts (eg components)
Diffstat (limited to 'plugins/mod_tokenauth.lua')
-rw-r--r--plugins/mod_tokenauth.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua
index 8e516924..b023d9f8 100644
--- a/plugins/mod_tokenauth.lua
+++ b/plugins/mod_tokenauth.lua
@@ -30,7 +30,7 @@ function create_jid_token(actor_jid, token_jid, token_scope, token_ttl)
};
local token_id = id.long();
- local token = base64.encode("1;"..token_username.."@"..token_host..";"..token_id);
+ local token = base64.encode("1;"..jid.join(token_username, token_host)..";"..token_id);
token_store:set(token_username, token_id, token_info);
return token, token_info;