plugins/mod_tokenauth.lua
changeset 10678 4459afac4d13
parent 10673 bf81523e2ff4
child 10679 5efd6865486c
--- a/plugins/mod_tokenauth.lua	Thu Feb 27 20:05:47 2020 +0100
+++ b/plugins/mod_tokenauth.lua	Fri Feb 28 14:13:04 2020 +0100
@@ -30,7 +30,7 @@
 	};
 
 	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;