Elixir library for Standard Webhooks
Verifying a webhook payload:
StandardWebhooks.verify(webhook_payload, plug_conn, webhook_secret)Note: Plug contains the request headers.
Signing a webhook
StandardWebhooks.sign(webhook_id, webhook_timestamp, webhook_payload, webhook_secret)The package can be installed by adding standard_webhooks to your list of dependencies in mix.exs:
def deps do
[
# ... your other deps
{:standard_webhooks, "~> 0.1.0"}
]
endThen run:
mix deps.getiex -S mixSimply run:
mix testmix quality