Safe Haskell | None |
---|---|
Language | Haskell2010 |
Verification of incomming webhook payloads, as described at https://developer.github.com/webhooks/securing/
- isValidPayload :: String -> Maybe String -> ByteString -> Bool
Documentation
:: String | the secret |
-> Maybe String | 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.