github-0.12: Access to the Github API, v3.

Safe HaskellNone
LanguageHaskell98

Github.Repos.Webhooks.Validate

Description

Verification of incomming webhook payloads, as described at https://developer.github.com/webhooks/securing/

Synopsis

Documentation

isValidPayload Source

Arguments

:: String

the secret

-> Maybe String

the hash provided by the remote party in X-Hub-Signature (if any), including the 'sha1=...' prefix

-> ByteString

the body

-> Bool 

Validates a given payload against a given HMAC hexdigest using a given secret. Returns True iff the given hash is non-empty and it's a valid signature of the payload.