mirror of
https://codeberg.org/icewind/rss-webhook-trigger.git
synced 2026-11-30 04:00:49 +01:00
add option for serving jwt info
This commit is contained in:
parent
766a820f96
commit
c04a04ea29
8 changed files with 256 additions and 22 deletions
21
README.md
21
README.md
|
|
@ -35,6 +35,27 @@ feed = "docker-hub://matrixdotorg/synapse"
|
|||
hook = "https://hook.example.com/hook2/call"
|
||||
```
|
||||
|
||||
### JWT Authorization
|
||||
|
||||
rss-webhook-trigger supports generating JWT tokens to use for authorization. This can be used to authenticate against various services without the need for long-lived keys.
|
||||
|
||||
This current has been tested with [Forgejo's Authorized Integrations](https://forgejo.org/docs/latest/user/api/authorized-integrations).
|
||||
|
||||
```toml
|
||||
[jwt]
|
||||
key = "RS256 JWT key, or path to the key"
|
||||
issuer = "https://example.com"
|
||||
# optionally, serve `/.well-known/openid-configuration` and `/.well-known/keys` with the key information
|
||||
listen = { address = "0.0.0.0", port = "3000" }
|
||||
# listen = {path = "/var/run/webhook.sock" }
|
||||
|
||||
[[feed]]
|
||||
feed = "https://example.com/feed3.xml"
|
||||
hook = "https://hook.example.com/hook3/call"
|
||||
headers = { authorization = {type = "jwt", aud: "...."} }
|
||||
body = { event_type = "build" }
|
||||
```
|
||||
|
||||
### Usage in NixOS
|
||||
|
||||
A NixOS module is included and can be used like this:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue