You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2024/12/05 09:29:21 UTC
(apisix) branch master updated: docs: update jwt-auth docs (#11785)
This is an automated email from the ASF dual-hosted git repository.
wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new d599d20c2 docs: update jwt-auth docs (#11785)
d599d20c2 is described below
commit d599d20c25cc3ca275da27d1174398d9e1d91fd5
Author: Michele Righi <ri...@gmail.com>
AuthorDate: Thu Dec 5 10:29:16 2024 +0100
docs: update jwt-auth docs (#11785)
---
docs/en/latest/plugins/jwt-auth.md | 14 +++++++-------
docs/zh/latest/plugins/jwt-auth.md | 1 +
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/docs/en/latest/plugins/jwt-auth.md b/docs/en/latest/plugins/jwt-auth.md
index 1f8f47092..38fab4e87 100644
--- a/docs/en/latest/plugins/jwt-auth.md
+++ b/docs/en/latest/plugins/jwt-auth.md
@@ -47,18 +47,18 @@ For Consumer:
| exp | integer | False | 86400 | [1,...] | Expiry time of the token in seconds. |
| base64_secret | boolean | False | false | | Set to true if the secret is base64 encoded. |
| lifetime_grace_period | integer | False | 0 | [0,...] | Define the leeway in seconds to account for clock skew between the server that generated the jwt and the server validating it. Value should be zero (0) or a positive integer. |
-| key_claim_name | string | False | key | | The name of the JWT claim that contains the user key (corresponds to Consumer's key attribute). |
NOTE: `encrypt_fields = {"secret"}` is also defined in the schema, which means that the field will be stored encrypted in etcd. See [encrypted storage fields](../plugin-develop.md#encrypted-storage-fields).
For Route:
-| Name | Type | Required | Default | Description |
-|--------|--------|----------|---------------|---------------------------------------------------------------------|
-| header | string | False | authorization | The header to get the token from. |
-| query | string | False | jwt | The query string to get the token from. Lower priority than header. |
-| cookie | string | False | jwt | The cookie to get the token from. Lower priority than query. |
-| hide_credentials | boolean | False | false | Set to true will not pass the authorization request of header\query\cookie to the Upstream.|
+| Name | Type | Required | Default | Description |
+|------------------|---------|----------|---------------|-------------------------------------------------------------------------------------------------|
+| header | string | False | authorization | The header to get the token from. |
+| query | string | False | jwt | The query string to get the token from. Lower priority than header. |
+| cookie | string | False | jwt | The cookie to get the token from. Lower priority than query. |
+| hide_credentials | boolean | False | false | Set to true will not pass the authorization request of header\query\cookie to the Upstream. |
+| key_claim_name | string | False | key | The name of the JWT claim that contains the user key (corresponds to Consumer's key attribute). |
You can implement `jwt-auth` with [HashiCorp Vault](https://www.vaultproject.io/) to store and fetch secrets and RSA keys pairs from its [encrypted KV engine](https://developer.hashicorp.com/vault/docs/secrets/kv) using the [APISIX Secret](../terminology/secret.md) resource.
diff --git a/docs/zh/latest/plugins/jwt-auth.md b/docs/zh/latest/plugins/jwt-auth.md
index 88065cb50..6c848aa3d 100644
--- a/docs/zh/latest/plugins/jwt-auth.md
+++ b/docs/zh/latest/plugins/jwt-auth.md
@@ -58,6 +58,7 @@ Route 端:
| query | string | 否 | jwt | 设置我们从哪个 query string 获取 token,优先级低于 header。 |
| cookie | string | 否 | jwt | 设置我们从哪个 cookie 获取 token,优先级低于 query。 |
| hide_credentials | boolean | 否 | false | 该参数设置为 `true` 时,则不会将含有认证信息的 header\query\cookie 传递给 Upstream。|
+| key_claim_name | string | 否 | key | 包含用户密钥(对应消费者的密钥属性)的 JWT 声明的名称。|
您可以使用 [HashiCorp Vault](https://www.vaultproject.io/) 实施 `jwt-auth`,以从其[加密的 KV 引擎](https://developer.hashicorp.com/vault/docs/secrets/kv) 使用 [APISIX Secret](../terminology/secret.md) 资源。