changeset 5230:ac252db71027

mod_http_oauth2: Log flows enabled and disabled If a developer ever wants to be sure what the state is
author Kim Alvefur <zash@zash.se>
date Fri, 10 Mar 2023 12:01:52 +0100
parents c24a622a7b85
children bef543068077
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Fri Mar 10 11:54:30 2023 +0100
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Fri Mar 10 12:01:52 2023 +0100
@@ -445,7 +445,10 @@
 local allowed_grant_type_handlers = module:get_option_set("allowed_oauth2_grant_types", {"authorization_code", "password"})
 for handler_type in pairs(grant_type_handlers) do
 	if not allowed_grant_type_handlers:contains(handler_type) then
+		module:log("debug", "Grant type %q disabled", handler_type);
 		grant_type_handlers[handler_type] = nil;
+	else
+		module:log("debug", "Grant type %q enabled", handler_type);
 	end
 end
 
@@ -453,7 +456,10 @@
 local allowed_response_type_handlers = module:get_option_set("allowed_oauth2_response_types", {"code"})
 for handler_type in pairs(response_type_handlers) do
 	if not allowed_response_type_handlers:contains(handler_type) then
+		module:log("debug", "Response type %q disabled", handler_type);
 		grant_type_handlers[handler_type] = nil;
+	else
+		module:log("debug", "Response type %q enabled", handler_type);
 	end
 end