Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function for validating webhook signatures #86

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidsbond
Copy link

This commit adds a new function ConstructEvent which is used to decode the contents of an HTTP request body into a type WebhookEvent that can be used to handle individual webhook events.

The function also performs validation of the webhook signature prior to decoding. This is done by generating an HMAC256 hash of the request contents and checking that it matches the value provided in the Signature header.

This commit adds a new function `ConstructEvent` which is used to decode the contents of
an HTTP request body into a type `WebhookEvent` that can be used to handle individual
webhook events.

The function also performs validation of the webhook signature prior to decoding. This
is done by generating an HMAC256 hash of the request contents and checking that it
matches the value provided in the `Signature` header.

Signed-off-by: David Bond <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant