Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanateras/cobwebhook
Set of webhook Plug middleware
https://github.com/yanateras/cobwebhook
elixir elixir-library github-api hex-package slack-api webhook-server
Last synced: 2 days ago
JSON representation
Set of webhook Plug middleware
- Host: GitHub
- URL: https://github.com/yanateras/cobwebhook
- Owner: yanateras
- License: cc0-1.0
- Created: 2019-08-05T10:58:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-05T10:58:49.000Z (over 5 years ago)
- Last Synced: 2024-12-22T01:05:42.228Z (17 days ago)
- Topics: elixir, elixir-library, github-api, hex-package, slack-api, webhook-server
- Language: Elixir
- Homepage: https://hex.pm/packages/cobwebhook
- Size: 12.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Cobwebhook
Set of plugs that do authentication and payload processing for various services.
## API
Use as a part of Plug pipeline:
```
defmodule Pipeline do
use Plug.Builderdef secrets do
["1cb606ad1ccf30f99f60c8bc1d0bfec9"]
endplug Cobwebhook.Slack, &__MODULE__.secrets/0
plug Webhook
end
```Takes a function that returns a list of valid secrets. On valid request, sets
`conn.body_params` and `conn.assigns.secret` and forwards request to the next
plug in the pipeline.