shreemaan-abhishek commented on code in PR #11152:
URL: https://github.com/apache/apisix/pull/11152#discussion_r1574135092


##########
apisix/utils/plugin-util.lua:
##########


Review Comment:
   how about `auth-util` for the file name?



##########
apisix/plugins/multi-auth.lua:
##########
@@ -72,18 +77,50 @@ function _M.rewrite(conf, ctx)
             status_code = auth_code
             if auth_code == nil then
                 core.log.debug(auth_plugin_name .. " succeed to authenticate 
the request")
-                goto authenticated
+                goto hide_credentials
             else
                 core.log.debug(auth_plugin_name .. " failed to authenticate 
the request, code: "
                         .. auth_code)
             end
         end
     end
+    goto hide_credentials

Review Comment:
   why is this needed?



##########
apisix/plugins/multi-auth.lua:
##########
@@ -72,18 +77,50 @@ function _M.rewrite(conf, ctx)
             status_code = auth_code
             if auth_code == nil then
                 core.log.debug(auth_plugin_name .. " succeed to authenticate 
the request")
-                goto authenticated
+                goto hide_credentials
             else
                 core.log.debug(auth_plugin_name .. " failed to authenticate 
the request, code: "
                         .. auth_code)
             end
         end
     end
+    goto hide_credentials
+
+
+    :: hide_credentials ::
+        if conf.hide_credentials then

Review Comment:
   would it be better to wrap this logic to a function?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to