Skip to content

Commit 84c9801

Browse files
committed
Update jwe doc for http and tls
1 parent a795e3b commit 84c9801

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/jwe_authentication.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ To use this endpoint, you must have JWE authentication enabled on the server.
100100

101101
**Request Body:** A JSON object with the desired claims for the token. The claims are the same as the parameters for the CLI generator.
102102

103-
**Example Request:**
103+
**Example Request for HTTP:**
104104
```bash
105105
curl -X POST http://localhost:8080/jwe-token-generator \
106106
-H "Content-Type: application/json" \
@@ -114,6 +114,25 @@ curl -X POST http://localhost:8080/jwe-token-generator \
114114
"expiry": 3600
115115
}'
116116
```
117+
**Example Request for HTTPS/TLS:**
118+
119+
Protocol is always http but with TLS enabled we need to add a couple of tls params:
120+
121+
```bash
122+
curl -X POST http://localhost:8080/jwe-token-generator \
123+
-H "Content-Type: application/json" \
124+
-d '{
125+
"host": "clickhouse.example.com",
126+
"port": 8443,
127+
"database": "my_database",
128+
"username": "my_user",
129+
"password": "my_password",
130+
"protocol": "http",
131+
"tls_enabled": true,
132+
"tls_insecure_skip_verify": false,
133+
"expiry": 3600
134+
}'
135+
```
117136

118137
**Successful Response:** A JSON object containing the generated token.
119138

0 commit comments

Comments
 (0)