8000 Separate hook parsing and validation · Issue #6 · rjz/githubhook · GitHub
[go: up one dir, main page]

Skip to content

Separate hook parsing and validation #6

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

Closed
rjz opened this issue Aug 5, 2016 · 1 comment
Closed

Separate hook parsing and validation #6

rjz opened this issue Aug 5, 2016 · 1 comment

Comments

@rjz
Copy link
Owner
rjz commented Aug 5, 2016

The current signature of Parse(secret, req) assumes that the secret will be known prior to parsing, which might not be the case if (e.g.) a webhook is servicing requests from multiple origins with individually configured secrets. In this case, it would be useful to have both a New(req) method for extracting the inbound request into a Hook and a Verify(hook, secret) method so that the hook can be provisionally extracted and inspected before verification takes place.

rjz added a commit that referenced this issue Aug 5, 2016
Separating `Parse` into separate `New` and `SignedBy` methods will allow
consumers to provisionally extract hook content from an HTTP request
(via `New`) before verifyingt that the hook signature meets
expectations.
rjz added a commit that referenced this issue Aug 5, 2016
@rjz
Copy link
Owner Author
rjz commented Aug 5, 2016

Fixed in #7.

@rjz rjz closed this as completed Aug 5, 2016
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

No branches or pull requests

1 participant
0