From 6b483189acb9bd69d29417dd3fbe440084a2f2d8 Mon Sep 17 00:00:00 2001 From: WeixinX <49450531+WeixinX@users.noreply.github.com> Date: Fri, 12 May 2023 14:23:58 +0800 Subject: [PATCH] docs: fix some plugin READMEs (#327) --- plugins/wasm-cpp/extensions/jwt_auth/README.md | 2 ++ plugins/wasm-cpp/extensions/jwt_auth/README_EN.md | 14 +++++++------- .../wasm-cpp/extensions/key_rate_limit/README.md | 1 + .../extensions/key_rate_limit/README_EN.md | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/wasm-cpp/extensions/jwt_auth/README.md b/plugins/wasm-cpp/extensions/jwt_auth/README.md index a8e0da861..6e9868709 100644 --- a/plugins/wasm-cpp/extensions/jwt_auth/README.md +++ b/plugins/wasm-cpp/extensions/jwt_auth/README.md @@ -244,12 +244,14 @@ public class GenerateJwtDemo { - 只有当`from_headers`,`from_params`,`from_cookies`均未配置时,才会使用默认值 `from_headers` 中每一项的配置字段说明如下: + | 名称 | 数据类型 | 填写要求| 默认值 | 描述 | | ---------------- | --------------- | ------- | ------ | --------------------------------------------------------- | | `name` | string | 必填 | - | 抽取JWT的请求header | | `value_prefix` | string | 必填 | - | 对请求header的value去除此前缀,剩余部分作为JWT | `claims_to_headers` 中每一项的配置字段说明如下: + | 名称 | 数据类型 | 填写要求| 默认值 | 描述 | | ---------------- | --------------- | ------- | ------ | --------------------------------------------------------- | | `claim` | string | 必填 | - | JWT payload中的指定字段,要求必须是字符串或无符号整数类型 | diff --git a/plugins/wasm-cpp/extensions/jwt_auth/README_EN.md b/plugins/wasm-cpp/extensions/jwt_auth/README_EN.md index 4626b2f63..25b1e7940 100644 --- a/plugins/wasm-cpp/extensions/jwt_auth/README_EN.md +++ b/plugins/wasm-cpp/extensions/jwt_auth/README_EN.md @@ -390,10 +390,10 @@ consumers: ``` # Common Error Codes -| -HTTP Status Code | Error Message | Reason Description| -| ----------- | ---------------------- | -------------------------------------------------------------------------------- | -| 401 | JWT missing | The JWT is not provided in the request header. | -| 401 | JWT expired | The JWT has expired. | -| 401 | JWT verification fails | The JWT payload verification failed, such as the iss mismatch. | -| 403 | Access denied | Access to the current route is denied. | + +| HTTP Status Code | Error Message | Reason Description| +|------------------| ---------------------- | -------------------------------------------------------------------------------- | +| 401 | JWT missing | The JWT is not provided in the request header. | +| 401 | JWT expired | The JWT has expired. | +| 401 | JWT verification fails | The JWT payload verification failed, such as the iss mismatch. | +| 403 | Access denied | Access to the current route is denied. | diff --git a/plugins/wasm-cpp/extensions/key_rate_limit/README.md b/plugins/wasm-cpp/extensions/key_rate_limit/README.md index bb44b2ec0..97af36ff8 100644 --- a/plugins/wasm-cpp/extensions/key_rate_limit/README.md +++ b/plugins/wasm-cpp/extensions/key_rate_limit/README.md @@ -14,6 +14,7 @@ | limit_keys | array of object | 必填 | - | 配置匹配键值后的限流次数 | `limit_keys`中每一项的配置字段说明 + | 名称 | 数据类型 | 填写要求 | 默认值 | 描述 | | -------- | -------- | -------- | -------- | -------- | | key | string | 必填 | - | 匹配的键值 | diff --git a/plugins/wasm-cpp/extensions/key_rate_limit/README_EN.md b/plugins/wasm-cpp/extensions/key_rate_limit/README_EN.md index 2fe250fb0..7f40c0938 100644 --- a/plugins/wasm-cpp/extensions/key_rate_limit/README_EN.md +++ b/plugins/wasm-cpp/extensions/key_rate_limit/README_EN.md @@ -14,6 +14,7 @@ | limit_keys | array of object | Required | - | Rate-limiting thresholds when matching specific key-values | Field descriptions of `limit_keys` items: + | Name | Type | Requirement | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | | key | string | Required | - | Value to match of the specific key |