Changeset

498:50d0bd035bb7

util.sasl.oauthbearer: Don't send authzid It's not needed and not recommended in XMPP unless we want to act as someone other than who we authenticate as. We find out the JID during resource binding.
author Kim Alvefur <zash@zash.se>
date Fri, 23 Jun 2023 12:09:49 +0200
parents 497:eb86e3751978
children 499:57417c37d018
files util/sasl/oauthbearer.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl/oauthbearer.lua	Fri Jun 23 10:12:38 2023 +0200
+++ b/util/sasl/oauthbearer.lua	Fri Jun 23 12:09:49 2023 +0200
@@ -1,9 +1,9 @@
 
 return function (stream, name)
-	if name == "OAUTHBEARER" and stream.username then
+	if name == "OAUTHBEARER" then
 		return function (stream)
 			local auth = stream.bearer_token and ("Bearer "..stream.bearer_token) or "";
-			local message, data = coroutine.yield("n,a="..stream.username.."@"..stream.host..",\001auth="..auth.."\001\001");
+			local message, data = coroutine.yield("n,,\001auth="..auth.."\001\001");
 			if message == "success" then
 				return true;
 			elseif message == "challenge" then