You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "smileby (via GitHub)" <gi...@apache.org> on 2024/01/12 04:51:14 UTC

[PR] docs: add Chinese translation for multi-auth plugin doc [apisix]

smileby opened a new pull request, #10812:
URL: https://github.com/apache/apisix/pull/10812

   ### Description
   
   Fixes #10802 
   
   add Chinese translation for multi-auth plugin doc
   
   ### Checklist
   
   - [X] I have explained the need for this PR and the problem it solves
   - [X] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [X] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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-unsubscribe@apisix.apache.org

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


Re: [PR] docs: add Chinese translation for multi-auth plugin doc [apisix]

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #10812:
URL: https://github.com/apache/apisix/pull/10812


-- 
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-unsubscribe@apisix.apache.org

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


Re: [PR] docs: add Chinese translation for multi-auth plugin doc [apisix]

Posted by "smileby (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@apisix.apache.org

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


Re: [PR] docs: add Chinese translation for multi-auth plugin doc [apisix]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on code in PR #10812:
URL: https://github.com/apache/apisix/pull/10812#discussion_r1449878998


##########
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:
   @monkeyDluffy6017 should we remove the mentioning of dashboard here or is this good to go?
   
   This sentence was originally from this PR: https://github.com/apache/apisix/pull/10482/files



##########
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 个插件 |

Review Comment:
   ```suggestion
   | auth_plugins | array | True | -   | 添加需要支持的认证插件。至少需要 2 个插件。 |
   ```



-- 
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-unsubscribe@apisix.apache.org

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