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 a method for validation of JSON body #424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, left one small comment
params.put("CallSid", "CA1234567890ABCDE"); | ||
params.put("Caller", "+14158675309"); | ||
params.put("Digits", "1234"); | ||
params.put("From", "+14158675309"); | ||
params.put("To", "+18005551212"); | ||
|
||
String signature = "RSOYDt4T1cUTdK1PDd93/VVr8B8="; | ||
signature = "RSOYDt4T1cUTdK1PDd93/VVr8B8="; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to where signature
is declared, since it never changes?
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
1bea436
to
639557c
Compare
@ekarson Updated this PR, since requests can't have both params and bodies. |
If we want to validate requests that have a POST body payload, this allows us to compare it against the
bodySHA256
parameter that will be sent from the Twilio Webhook.