SylviaBABY commented on code in PR #6895:
URL: https://github.com/apache/apisix/pull/6895#discussion_r854916458


##########
docs/zh/latest/plugins/jwt-auth.md:
##########
@@ -23,49 +29,62 @@ title: jwt-auth
 
 ## 描述
 
-`jwt-auth` 是一个认证插件,它需要与 `consumer` 一起配合才能工作。
+`jwt-auth` 插件用于将 [JWT](https://jwt.io/) 身份验证添加到 
[Service](../terminology/service.md) 或 [Route](../terminology/route.md) 中。
 
-添加 JWT Authentication 到一个 `service` 或 `route`。 然后 `consumer` 
将其密钥添加到查询字符串参数、请求头或 `cookie` 中以验证其请求。
+然后 Consumer 需要将其密匙添加到查询字符串参数、请求头或 `cookie` 中用来验证其请求。
 
-有关 JWT 的更多信息,可参考 [JWT](https://jwt.io/) 查看更多信息。
-
-`jwt-auth` 插件可以与 HashiCorp Vault 集成,用于存储和获取密钥,从其加密的 KV 引擎获取 RSA 密钥对。 阅读下面的 
[例子](#enable-jwt-auth-with-vault-compatibility) 来了解它如何工作。
+`jwt-auth` 插件可以与 [HashiCorp Vault](https://www.vaultproject.io/) 
集成,用于存储和获取密钥,并从 HashiCorp Vault 的 [encrypted KV 
engine](https://www.vaultproject.io/docs/secrets/kv)中获取 RSA 密匙对。你可以从下面的 
[示例](#与-HashiCorp-Vault-一起使用) 中了解更多信息。
 
 ## 属性
 
-consumer 端配置:
+Consumer 端:
+
+| 名称          | 类型     | 必选项 | 默认值  | 有效值                      | 描述            
                                                                                
              |
+| ------------- | ------- | ----- | ------- | --------------------------- | 
------------------------------------------------------------------------------------------------------------
 |
+| key           | string  | 是    |         |                             | 
Consumer 的 `access_key` 必须是唯一的。如果不同 Consumer 使用了相同的 `access_key` ,将会出现请求匹配异常。 |
+| secret        | string  | 否    |         |                             | 
加密秘钥。如果未指定,后台将会自动生成。                                                            
      |
+| public_key    | string  | 否    |         |                             | RSA 
公钥, `algorithm` 属性选择 `RS256` 算法时必选。                                             
               |
+| private_key   | string  | 否    |         |                             | RSA 
私钥, `algorithm` 属性选择 `RS256` 算法时必选。                                             
               |
+| algorithm     | string  | 否    | "HS256" | ["HS256", "HS512", "RS256"] | 
加密算法。                                                                           
                           |
+| exp           | integer | 否    | 86400   | [1,...]                     | 
token 的超时时间。                                                                    
                          |
+| base64_secret | boolean | 否    | false   |                             | 
当设置为 `true` 时,密钥为 base64 编码。                                                    
                                     |
+| vault         | object  | 否    |         |                             | 
是否使用 Vault 作为存储和检索密钥(HS256/HS512 的密钥或 RS256 的公钥和私钥)的方式。该插件默认使用 
`kv/apisix/consumer/<consumer name>/jwt-auth` 路径进行密钥检索。 |
+
+:::info IMPORTANT
+
+如果你想要启用 Vault 集成,你需要在 
[config.yaml](https://github.com/apache/apisix/blob/master/conf/config.yaml) 
配置文件中,更新你的 Vault 服务器配置、主机地址和访问令牌。
 
-| 名称          | 类型    | 必选项 | 默认值  | 有效值                      | 描述             
                                                                                
             |
-| :------------ | :------ | :----- | :------ | :-------------------------- | 
:------------------------------------------------------------------------------------------------------------
 |
-| key           | string  | 必须   |         |                             | 不同的 
`consumer` 对象应有不同的值,它应当是唯一的。不同 consumer 使用了相同的 `key` ,将会出现请求匹配异常。 |
-| secret        | string  | 可选   |         |                             | 
加密秘钥。如果您未指定,后台将会自动帮您生成。                                                         
       |
-| public_key    | string  | 可选   |         |                             | RSA 
公钥, `algorithm` 属性选择 `RS256` 算法时必填                                              
              |
-| private_key   | string  | 可选   |         |                             | RSA 
私钥, `algorithm` 属性选择 `RS256` 算法时必填                                              
              |
-| algorithm     | string  | 可选   | "HS256" | ["HS256", "HS512", "RS256"] | 
加密算法                                                                            
                          |
-| exp           | integer | 可选   | 86400   | [1,...]                     | 
token 的超时时间                                                                     
                         |
-| base64_secret | boolean | 可选   | false   |                             | 
密钥是否为 base64 编码                                                                 
                       |
-| vault         | object  | 可选   |         |                             | 
是否使用 Vault 作为存储和检索密钥(HS256/HS512 的密钥或 RS256 的公钥和私钥)的方式。该插件默认使用 
`kv/apisix/consumer/<consumer name>/jwt-auth` 路径进行密钥检索 |
+请参考默认配置文件 
[config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml)
 中的 Vault 属性下了解相关配置。
 
-**注意**: 要启用 Vault 集成,首先访问 
[config.yaml](https://github.com/apache/apisix/blob/master/conf/config.yaml),更新您的
 Vault 服务器配置、主机地址和访问令牌。您可以在 
[config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml)
 中 vault 属性下查看 APISIX 的默认配置。
+:::
 
-router 端配置:
+Route 端:
 
-| 名称 | 类型   | 必选项 | 默认值 | 有效值 | 描述                                             
                                                             |
-| ---- | ------ | ------ | ------ | ------ | 
-------------------------------------------------------------------------------------------------------------
 |
-| header  | string | 可选 | authorization |        | 设置我们从哪个 header 获取 token。 |
-| query  | string | 可选 | jwt |        | 设置我们从哪个 query string 获取 token,优先级低于 
header |
-| cookie  | string | 可选 | jwt |        | 设置我们从哪个 cookie 获取 token,优先级低于 query |
+| 名称   | 类型    | 必选项 | 默认值         | 描述                                        
            |
+| ------ | ------ | ------ | ------------- 
|---------------------------------------------------------|
+| header | string | 否     | authorization | 设置我们从哪个 header 获取 token。           
              |
+| query  | string | 否     | jwt           | 设置我们从哪个 query string 获取 
token,优先级低于 header。  |
+| cookie | string | 否     | jwt           | 设置我们从哪个 cookie 获取 token,优先级低于 
query。        |
 
 ## 接口

Review Comment:
   ```suggestion
   
   ```



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