This repository was archived by the owner on Jan 31, 2019. It is now read-only.
Commit 6e1cbd8
committed
Add ability to set public key signature
This commit adds support for fetching and assigning a public key-based
signature of the request body.
Higher in the call stack, we instantiate a public key that is capable of
signing a message and inject it into the `Service` base class along with
whether or not the request needs to be signed. If it does need to be
signed, we add the base64 encoded signature to the headers of the
request, similar to HMAC signing.
This, paired with metadata that's injected into the webhook body with
requests that need to be signed, helps ensure that the request is
authentic and not a malicious payload and can help protect against
replay attacks.1 parent c70a096 commit 6e1cbd8
2 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
| |||
0 commit comments