License | BSD-3-Clause |
---|---|
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
Verification of incomming webhook payloads, as described at https://developer.github.com/webhooks/securing/
Synopsis
- isValidPayload :: Text -> Maybe Text -> ByteString -> Bool
Documentation
:: Text | the secret |
-> Maybe Text | the hash provided by the remote party
in |
-> 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.