jackkkkklee commented on code in PR #7634:
URL: https://github.com/apache/apisix/pull/7634#discussion_r947417544


##########
apisix/plugins/openfunction.lua:
##########
@@ -18,17 +18,23 @@ local ngx_encode_base64 = ngx.encode_base64
 local plugin_name, plugin_version, priority = "openfunction", 0.1, -1902
 
 local openfunction_authz_schema = {
-    service_token = {type = "string"}
+    type = "object",
+    properties = {
+        service_token = {type = "string"},
+        user_token = {type = "string"}
+    }
 }
 
 local function request_processor(conf, ctx, params)
     local headers = params.headers or {}
-    -- setting authorization headers if not already set
-    if not headers["authorization"] and conf.authorization
-            and conf.authorization.service_token then
-        headers["authorization"] = "Basic " .. 
ngx_encode_base64(conf.authorization.service_token)
+    -- setting authorization headers if conf.authorization exists
+    if conf.authorization then
+        if conf.authorization.user_token then
+            headers["authorization"] = conf.authorization.user_token

Review Comment:
   removed it



-- 
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