Skip to content

Commit 1bfc7ab

Browse files
author
Sarah Edwards
authored
Apply suggestions from code review
1 parent b297be3 commit 1bfc7ab

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

content/webhooks-and-events/webhooks/securing-your-webhooks.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,20 @@ Your language and server implementations may differ from the following examples.
6666

6767
### Test values
6868

69-
Regardless of programming language, these values can be used to know that the implementation is correct.
69+
Regardless of the programming language that you use to implement HMAC verification in your code, you can use the following `secret` and `payload` values to verify that your implementation is correct.
7070

71-
```yaml
72-
Secret: It's a Secret to Everybody
73-
Payload: Hello, World!
71+
- secret: "It's a Secret to Everybody"
72+
- payload: "Hello, World!"
7473

75-
Algorithm: SHA-256
76-
Signature: 757107ea0eb2509fc211221cce984b8a37570b6d7586c22c46f4379c8b043e17
77-
X-Hub-Signature: sha256=757107ea0eb2509fc211221cce984b8a37570b6d7586c22c46f4379c8b043e17
74+
If your implementation is correct and uses the SHA-256 algorithm, the signatures that you generate should match the following signature values:
7875

79-
Algorithm: SHA-1
80-
Signature: 01dc10d0c83e72ed246219cdd91669667fe2ca59
81-
X-Hub-Signature: sha1=01dc10d0c83e72ed246219cdd91669667fe2ca59
82-
```
76+
- signature: 757107ea0eb2509fc211221cce984b8a37570b6d7586c22c46f4379c8b043e17
77+
- x-hub-signature: sha256=757107ea0eb2509fc211221cce984b8a37570b6d7586c22c46f4379c8b043e17
78+
79+
If your implementation is correct and uses the SHA-1 algorithm, the signatures that you generate should match the following signature values:
8380

81+
- signature: 01dc10d0c83e72ed246219cdd91669667fe2ca59
82+
- x-hub-signature: sha1=01dc10d0c83e72ed246219cdd91669667fe2ca59
8483
### Ruby example
8584

8685
For example, you can define the following `verify_signature` function:

0 commit comments

Comments
 (0)