Skip to content

Commit 00aa231

Browse files
authored
add more examples for shared secrets
1 parent da23e72 commit 00aa231

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/auth_plugins.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,13 @@ auth:
345345
header: Authorization
346346
```
347347

348+
```bash
349+
curl -X POST "https://your-hooks-server.com/webhooks/example" \
350+
-H "Authorization: your-shared-secret" \
351+
-H "Content-Type: application/json" \
352+
-d '{"event":"test","data":"example"}'
353+
```
354+
348355
**Custom header shared secret:**
349356

350357
```yaml
@@ -354,6 +361,14 @@ auth:
354361
header: X-API-Key
355362
```
356363

364+
```bash
365+
curl -X POST "https://your-hooks-server.com/webhooks/example" \
366+
-H "X-API-Key: your-shared-secret" \
367+
-H "Content-Type: application/json" \
368+
-d '{"event":"test","data":"example"}'
369+
```
370+
371+
357372
## Custom Auth Plugins
358373

359374
This section provides an example of how to implement a custom authentication plugin for a hypothetical system. The plugin checks for a specific authorization header and validates it against a secret stored in an environment variable.

0 commit comments

Comments
 (0)