dspo commented on code in PR #11601:
URL: https://github.com/apache/apisix/pull/11601#discussion_r1776313740


##########
docs/en/latest/admin-api.md:
##########
@@ -868,6 +868,71 @@ Since `v2.2`, we can bind multiple authentication plugins 
to the same consumer.
 
 Currently, the response is returned from etcd.
 
+## Credential
+
+Credential is used to hold the authentication credentials for the Consumer.
+Credentials are used when multiple credentials need to be configured for a 
Consumer.
+
+### Credential API
+
+Credential resource request 
address:/apisix/admin/consumers/{username}/credentials/{credential_id}
+
+### Request Methods
+
+| Method | Request URI                        | Request Body | Description     
                               |
+| ------ 
|----------------------------------------------------------------|--------------|------------------------------------------------|
+| GET    | /apisix/admin/consumers/{username}/credentials                 | 
NUll         | Fetches list of all credentials of the Consumer |
+| GET    | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
NUll         | Fetches the Credential by `credential_id`      |
+| PUT    | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
{...}        | Create or update a Creddential                 |
+| DELETE | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
NUll         | Delete the Credential                          |
+
+### Request Body Parameters
+
+| Parameter   | Required | Type        | Description                           
                     | Example                                         |
+| ----------- |-----| ------- 
|------------------------------------------------------------|-------------------------------------------------|
+| plugins     | False    | Plugin      | Auth plugins configuration.           
                     |                                                 |
+| desc        | False    | Auxiliary   | Description of usage scenarios.       
                     | credential xxxx                                 |
+| labels      | False    | Match Rules | Attributes of the Credential 
specified as key-value pairs. | 
{"version":"v2","build":"16","env":"production"} |
+
+Example Configuration:
+
+```shell
+{
+    "plugins": {
+      "key-auth": {
+        "key": "auth-one"
+      }
+    },
+    "desc": "hello world"
+}
+```
+
+### Example API usage
+
+Prerequisite: Consumer has been created.

Review Comment:
   I resolved it.



##########
docs/en/latest/admin-api.md:
##########
@@ -868,6 +868,71 @@ Since `v2.2`, we can bind multiple authentication plugins 
to the same consumer.
 
 Currently, the response is returned from etcd.
 
+## Credential
+
+Credential is used to hold the authentication credentials for the Consumer.
+Credentials are used when multiple credentials need to be configured for a 
Consumer.
+
+### Credential API
+
+Credential resource request 
address:/apisix/admin/consumers/{username}/credentials/{credential_id}
+
+### Request Methods
+
+| Method | Request URI                        | Request Body | Description     
                               |
+| ------ 
|----------------------------------------------------------------|--------------|------------------------------------------------|
+| GET    | /apisix/admin/consumers/{username}/credentials                 | 
NUll         | Fetches list of all credentials of the Consumer |
+| GET    | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
NUll         | Fetches the Credential by `credential_id`      |
+| PUT    | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
{...}        | Create or update a Creddential                 |
+| DELETE | /apisix/admin/consumers/{username}/credentials/{credential_id} | 
NUll         | Delete the Credential                          |
+
+### Request Body Parameters
+
+| Parameter   | Required | Type        | Description                           
                     | Example                                         |
+| ----------- |-----| ------- 
|------------------------------------------------------------|-------------------------------------------------|
+| plugins     | False    | Plugin      | Auth plugins configuration.           
                     |                                                 |
+| desc        | False    | Auxiliary   | Description of usage scenarios.       
                     | credential xxxx                                 |
+| labels      | False    | Match Rules | Attributes of the Credential 
specified as key-value pairs. | 
{"version":"v2","build":"16","env":"production"} |
+
+Example Configuration:
+
+```shell
+{
+    "plugins": {
+      "key-auth": {
+        "key": "auth-one"
+      }
+    },
+    "desc": "hello world"
+}
+```
+
+### Example API usage
+
+Prerequisite: Consumer has been created.
+
+Create Credential and specify the authentication plugin `key-auth`:

Review Comment:
   I resolved it.



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