You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/latest/plugins/basic-auth.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ keywords:
6
6
- Plugin
7
7
- Basic Auth
8
8
- basic-auth
9
-
description: The basic-auth plugin adds basic access authentication for Consumers to authenticate themselves before being able to access Upstream resources.
9
+
description: The basic-auth Plugin adds basic access authentication for Consumers to authenticate themselves before being able to access Upstream resources.
10
10
---
11
11
12
12
<!--
@@ -34,7 +34,7 @@ description: The basic-auth plugin adds basic access authentication for Consumer
34
34
35
35
## Description
36
36
37
-
The `basic-auth`plugin adds [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) for [Consumers](../terminology/consumer.md) to authenticate themselves before being able to access Upstream resources.
37
+
The `basic-auth`Plugin adds [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) for [Consumers](../terminology/consumer.md) to authenticate themselves before being able to access Upstream resources.
38
38
39
39
When a Consumer is successfully authenticated, APISIX adds additional headers, such as `X-Consumer-Username`, `X-Credential-Indentifier`, and other Consumer custom headers if configured, to the request, before proxying it to the Upstream service. The Upstream service will be able to differentiate between consumers and implement additional logics as needed. If any of these values is not available, the corresponding header will not be added.
40
40
@@ -58,7 +58,7 @@ For Route:
58
58
59
59
## Examples
60
60
61
-
The examples below demonstrate how you can work with the `basic-auth`plugin for different scenarios.
61
+
The examples below demonstrate how you can work with the `basic-auth`Plugin for different scenarios.
62
62
63
63
:::note
64
64
@@ -411,7 +411,7 @@ You should see an `HTTP/1.1 200 OK` response with the `X-Consumer-Custom-Id` sim
411
411
412
412
The following example demonstrates how you can configure different rate limiting policies by regular and anonymous consumers, where the anonymous Consumer does not need to authenticate and has less quotas.
413
413
414
-
Create a regular Consumer `johndoe` and configure the `limit-count`plugin to allow for a quota of 3 within a 30-second window:
414
+
Create a regular Consumer `johndoe` and configure the `limit-count`Plugin to allow for a quota of 3 within a 30-second window:
415
415
416
416
```shell
417
417
curl "http://127.0.0.1:9180/apisix/admin/consumers" -X PUT \
@@ -444,7 +444,7 @@ curl "http://127.0.0.1:9180/apisix/admin/consumers/johndoe/credentials" -X PUT \
444
444
}'
445
445
```
446
446
447
-
Create an anonymous user `anonymous` and configure the `limit-count`plugin to allow for a quota of 1 within a 30-second window:
447
+
Create an anonymous user `anonymous` and configure the `limit-count`Plugin to allow for a quota of 1 within a 30-second window:
448
448
449
449
```shell
450
450
curl "http://127.0.0.1:9180/apisix/admin/consumers" -X PUT \
@@ -461,7 +461,7 @@ curl "http://127.0.0.1:9180/apisix/admin/consumers" -X PUT \
461
461
}'
462
462
```
463
463
464
-
Create a Route and configure the `basic-auth`plugin to accept anonymous Consumer `anonymous` from bypassing the authentication:
464
+
Create a Route and configure the `basic-auth`Plugin to accept anonymous Consumer `anonymous` from bypassing the authentication:
465
465
466
466
```shell
467
467
curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \
0 commit comments