smileby commented on code in PR #10812:
URL: https://github.com/apache/apisix/pull/10812#discussion_r1449885600


##########
docs/zh/latest/plugins/multi-auth.md:
##########
@@ -0,0 +1,159 @@
+---
+title: multi-auth
+keywords:
+  - Apache APISIX
+  - API 网关
+  - Plugin
+  - Multi Auth
+  - multi-auth
+description: 本文档包含有关 Apache APISIX multi-auth 插件的信息。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+插件 `multi-auth` 用于向 `Route` 或者 `Service` 中,添加多种身份验证方式。它支持 `auth` 类型的插件。您可以使用 
`multi-auth` 插件,来组合不同的身份认证方式。
+
+插件通过迭代 `auth_plugins` 属性指定的插件列表,提供了灵活的身份认证机制。它允许多个 `Consumer` 
在使用不同身份验证方式时共享相同的 `Route` ,同时。例如:一个 Consumer 使用 basic 认证,而另一个消费者使用 JWT 认证。
+
+## 属性
+
+For Route:
+
+| 名称           | 类型    | 必选项  | 默认值 | 描述                    |
+|--------------|-------|------|-----|-----------------------|
+| auth_plugins | array | True | -   | 添加需要支持的认证插件。至少需要 2 个插件 |
+
+## 启用插件
+
+要启用插件,您必须创建两个或多个具有不同身份验证插件配置的 Consumer:
+
+首先创建一个 Consumer 使用 basic-auth 插件:
+
+```shell
+curl http://127.0.0.1:9180/apisix/admin/consumers -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "username": "foo1",
+    "plugins": {
+        "basic-auth": {
+            "username": "foo1",
+            "password": "bar1"
+        }
+    }
+}'
+```
+
+然后再创建一个 Consumer 使用 key-auth 插件:
+
+```shell
+curl http://127.0.0.1:9180/apisix/admin/consumers -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "username": "foo2",
+    "plugins": {
+        "key-auth": {
+            "key": "auth-one"
+        }
+    }
+}'
+```
+
+您也可以使用 [APISIX Dashboard](/docs/dashboard/USER_GUIDE) 通过 web UI 来完成操作。

Review Comment:
   I think it's meaningless, this is part of the dashboard



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to