Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 99cd228

Browse files
Update doc [skip ci].
1 parent 56bb5cc commit 99cd228

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,22 @@ In case your application have multi issuers:
7979

8080
## Usage
8181

82-
Generate mock JWT token forwarded by Istio sidecar:
83-
8482
```shell
8583
#!/bin/bash
8684

85+
# Generate mock JWT token forwarded by Istio sidecar
86+
8787
payload='{"issuer":"issuer_1", "sub": "test"}';
8888
base64_payload=$(echo -n $payload | base64 -);
8989
origin_token=$(echo "header.$base64_payload.signature");
90-
```
9190

92-
You can test authenticate origin token with curl:
93-
94-
```shell
95-
#!/bin/bash
91+
#You can test authenticate origin token with curl:
9692

9793
curl -H "Authorization: $origin_token" http://localhost/
98-
```
99-
100-
Or authenticate base64 payload header:
10194

102-
```shell
103-
#!/bin/bash
95+
#Or authenticate base64 payload header:
10496

105-
curl -H "X-Istio-JWT-Payload: $base64_header" http://localhost/
97+
curl -H "X-Istio-JWT-Payload: $base64_payload" http://localhost/
10698
```
10799

108100
## Further readings

0 commit comments

Comments
 (0)