mod_http_oauth2: Correct error code when missing credentials for userinfo
authorKim Alvefur <zash@zash.se>
Mon, 10 Apr 2023 10:44:23 +0200
changeset 5339 53c6f49dcbb8
parent 5338 3c51eab0afe8
child 5340 77ac04bd2f65
mod_http_oauth2: Correct error code when missing credentials for userinfo
mod_http_oauth2/mod_http_oauth2.lua
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sat Apr 08 19:51:24 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Mon Apr 10 10:44:23 2023 +0200
@@ -750,7 +750,7 @@
 	local request = event.request;
 	local credentials = get_request_credentials(request);
 	if not credentials or not credentials.bearer_token then
-		return 400;
+		return 401;
 	end
 	local token_info = tokens.get_token_info(credentials.bearer_token);
 	if not token_info then