This is an automated email from the ASF dual-hosted git repository.
monkeydluffy 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 2c19fb1e0 docs: fix ip address in multi-auth doc (#10880)
2c19fb1e0 is described below
commit 2c19fb1e05c39cfcd98e6b52426971f71a0e7feb
Author: Traky Deng <[email protected]>
AuthorDate: Tue Jan 30 00:06:43 2024 -0600
docs: fix ip address in multi-auth doc (#10880)
---
docs/en/latest/plugins/multi-auth.md | 14 +++++---------
docs/zh/latest/plugins/multi-auth.md | 10 +++-------
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/docs/en/latest/plugins/multi-auth.md
b/docs/en/latest/plugins/multi-auth.md
index a55b69fb3..e79914743 100644
--- a/docs/en/latest/plugins/multi-auth.md
+++ b/docs/en/latest/plugins/multi-auth.md
@@ -75,8 +75,6 @@ curl http://127.0.0.1:9180/apisix/admin/consumers -H
'X-API-KEY: edd1c9f034335f1
}'
```
-You can also use the [APISIX Dashboard](/docs/dashboard/USER_GUIDE) to
complete the operation through a web UI.
-
Once you have created Consumer objects, you can then configure a Route or a
Service to authenticate requests:
```shell
@@ -113,16 +111,16 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H
'X-API-KEY: edd1c9f034335f13
After you have configured the Plugin as mentioned above, you can make a
request to the Route as shown below:
-request with basic-auth
+Send a request with `basic-auth` credentials:
```shell
curl -i -ufoo1:bar1 http://127.0.0.1:9080/hello
```
-request with key-auth
+Send a request with `key-auth` credentials:
```shell
-curl http://127.0.0.2:9080/hello -H 'apikey: auth-one' -i
+curl http://127.0.0.1:9080/hello -H 'apikey: auth-one' -i
```
```
@@ -131,11 +129,9 @@ HTTP/1.1 200 OK
hello, world
```
-If the request is not authorized, an error will be thrown:
+If the request is not authorized, an `401 Unauthorized` error will be thrown:
-```shell
-HTTP/1.1 401 Unauthorized
-...
+```json
{"message":"Authorization Failed"}
```
diff --git a/docs/zh/latest/plugins/multi-auth.md
b/docs/zh/latest/plugins/multi-auth.md
index d06c2b234..852911d7e 100644
--- a/docs/zh/latest/plugins/multi-auth.md
+++ b/docs/zh/latest/plugins/multi-auth.md
@@ -75,8 +75,6 @@ curl http://127.0.0.1:9180/apisix/admin/consumers -H
'X-API-KEY: edd1c9f034335f1
}'
```
-您也可以使用 [APISIX Dashboard](/docs/dashboard/USER_GUIDE) 通过 web UI 来完成操作。
-
创建 Consumer 之后,您可以配置一个路由或服务来验证请求:
```shell
@@ -122,7 +120,7 @@ curl -i -ufoo1:bar1 http://127.0.0.1:9080/hello
请求开启 key-auth 插件的 API
```shell
-curl http://127.0.0.2:9080/hello -H 'apikey: auth-one' -i
+curl http://127.0.0.1:9080/hello -H 'apikey: auth-one' -i
```
```
@@ -131,11 +129,9 @@ HTTP/1.1 200 OK
hello, world
```
-如果请求未授权,将会返回如下错误:
+如果请求未授权,将会返回 `401 Unauthorized` 错误:
-```shell
-HTTP/1.1 401 Unauthorized
-...
+```json
{"message":"Authorization Failed"}
```