Skip to content

Commit de608b8

Browse files
committed
try to clarify how to verify pshb secrets
1 parent d1d8881 commit de608b8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content/v3/repos/hooks.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,13 @@ to. The path must be in the format of `/:owner/:repo/events/:event`.
254254

255255
`hub.secret`
256256
: _Optional_ **string** - A shared secret key that generates a SHA1 HMAC
257-
of the payload content. You can verify a push came from GitHub by
258-
comparing the received body with the contents of the `X-Hub-Signature`
259-
header.
257+
of the outgoing body content. You can verify a push came from GitHub by
258+
comparing the raw request body with the contents of the `X-Hub-Signature`
259+
header. You can see [our Ruby implementation][ruby-secret], or [the
260+
PubSubHubbub documentation][pshb-secret] for more details.
260261

261262
[pubsub]: http://code.google.com/p/pubsubhubbub/
262263
[post-receive]: http://help.github.com/post-receive-hooks/
264+
[ruby-secret]: https://github.com/github/github-services/blob/14f4da01ce29bc6a02427a9fbf37b08b141e81d9/lib/services/web.rb#L47-L50
265+
[pshb-secret]: http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html#authednotify
263266

0 commit comments

Comments
 (0)