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

Safe HaskellNone
LanguageHaskell2010

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.