Diff

mod_http_oauth2/mod_http_oauth2.lua @ 4257:145e8e8a247a

mod_http_oauth2: Fix incomplete function arity change in dea6bea2ddd3
author Kim Alvefur <zash@zash.se>
date Sat, 21 Nov 2020 16:05:55 +0100
parent 4256:c4b9d4ba839b
child 4258:cc712899becd
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sat Nov 21 01:08:30 2020 +0100
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Sat Nov 21 16:05:55 2020 +0100
@@ -48,7 +48,7 @@
 	end
 	if usermanager.test_password(request_username, request_host, request_password) then
 		local granted_jid = jid.join(request_username, request_host, request_resource);
-		return json.encode(new_access_token(granted_jid, request_host, nil, nil));
+		return json.encode(new_access_token(granted_jid, nil, nil));
 	end
 	return oauth_error("invalid_grant", "incorrect credentials");
 end
@@ -148,7 +148,7 @@
 		end
 		if request_password == component_secret then
 			local granted_jid = jid.join(request_username, request_host, request_resource);
-			return json.encode(new_access_token(granted_jid, request_host, nil, nil));
+			return json.encode(new_access_token(granted_jid, nil, nil));
 		end
 		return oauth_error("invalid_grant", "incorrect credentials");
 	end