aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit92c65ed9af11d0e314db670b37af1119a6eb67e6 (patch)
tree6921061774f895e3f5db01bb97c62584b47c4455 /plugins
parent77a9f61e12742134ddfd845615c20932d5192a41 (diff)
downloadprosody-92c65ed9af11d0e314db670b37af1119a6eb67e6.tar.gz
prosody-92c65ed9af11d0e314db670b37af1119a6eb67e6.zip
mod_tokenauth: Handle tokens issued to bare hosts (eg components)
Diffstat (limited to 'plugins')
-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;