diff options
author | Kim Alvefur <zash@zash.se> | 2020-02-28 14:13:04 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-02-28 14:13:04 +0100 |
commit | d9782e12a3a1915a0f5ee6508194dca204530b7f (patch) | |
tree | 6921061774f895e3f5db01bb97c62584b47c4455 /plugins/mod_tokenauth.lua | |
parent | 6932bf9c38bddd91c031e6a1e4dd1cd66c5c323e (diff) | |
download | prosody-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.lua | 2 |
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; |