-
Notifications
You must be signed in to change notification settings - Fork 13
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
Include a VerifySignature() method #9
Comments
Might make sense to add - is there a section in their docs covering this? |
Yeah, it's in the Webhooks section of the docs. My implementation below: Changing init to add
Added a
Feel free to use / adjust or I can post a PR. |
Looks good to me. PR welcome! Can you be sure to include the documentation for it in the README as well? |
Done. I did update the README with info but was a little unsure on how to explain the optional nature of the extra argument in init. I left it out of the Coldbox explanation in the interest of brevity. But maybe it makes more sense to include all the arguments in that example for both of them. Also, though I did add the code to ModuleConfig and it is simple enough that I'm confident it's accurate - I didn't test this part because I'm not a Coldbox user. |
Resolved with your PR #11 Thanks! |
When listening for Mailgun webhooks, it's important to verify the signature. It would be nice to have this available in this component.
See here a c# implementation
Happy to create a PR if you want to include it.
I'd add an extra parameter to the init function - webhookSigningKey
Then create a new method verifySignature() that handles the verification, throwing an error if the webhookSigningKey is not set.
The text was updated successfully, but these errors were encountered: