Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.Builder

def secrets do
["1cb606ad1ccf30f99f60c8bc1d0bfec9"]
end

plug 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.