github-0.24: Access to the GitHub API, v3.

LicenseBSD-3-Clause
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

GitHub.Data.Webhooks.Validate

Description

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

Synopsis

Documentation

isValidPayload Source #

Arguments

:: Text

the secret

-> Maybe Text

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.