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: examples/jwt/README.md
+73-2Lines changed: 73 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ The Ingress controller provides the following 4 annotations for configuring JWT
9
9
* Optional: ```nginx.com/jwt-token: "token"``` -- specifies a variable that contains JSON Web Token. By default, a JWT is expected in the `Authorization` header as a Bearer Token.
10
10
* Optional: ```nginx.com/jwt-login-url: "url"``` -- specifies a URL to which a client is redirected in case of an invalid or missing JWT.
11
11
12
-
## Example
12
+
## Example 1: the Same JWT Key for All Paths
13
13
14
-
In the following example we enable JWT validation for the cafe-ingress Ingress:
14
+
In the following example we enable JWT validation for the cafe-ingress Ingress for all paths using the same key `cafe-jwk`:
15
15
```yaml
16
16
apiVersion: extensions/v1beta1
17
17
kind: Ingress
@@ -44,3 +44,74 @@ spec:
44
44
* The realm is `Cafe App`.
45
45
* The token is extracted from the `auth_token` cookie.
46
46
* The login URL is `https://login.example.com`.
47
+
48
+
## Example 2: a Separate JWT Key Per Path
49
+
50
+
In the following example we enable JWT validation for the [mergeable Ingresses](../mergeable-ingress-types) with a separate JWT key per path:
0 commit comments