--- a/mod_http_oauth2/mod_http_oauth2.lua Thu May 18 13:27:27 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua Thu May 18 13:41:23 2023 +0200
@@ -664,7 +664,7 @@
event.response.headers.content_type = "application/json";
local params = http.formdecode(event.request.body);
if not params then
- return error_response(event.request, oauth_error("invalid_request"));
+ return oauth_error("invalid_request");
end
if credentials and credentials.type == "basic" then
@@ -676,7 +676,7 @@
local grant_type = params.grant_type
local grant_handler = grant_type_handlers[grant_type];
if not grant_handler then
- return error_response(event.request, oauth_error("unsupported_grant_type"));
+ return oauth_error("invalid_request");
end
return grant_handler(params);
end