Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Synopsis
- data PayloadNotSecure = PayloadNotSecure
- isSecurePayload :: Text -> Maybe Text -> ByteString -> Bool
- assertSecurePayload :: Text -> Maybe Text -> ByteString -> IO ()
Documentation
data PayloadNotSecure Source #
An exception indicating that the given payload is not secure.
Instances
Show PayloadNotSecure Source # | |
Defined in GitHub.Data.Webhooks.Secure showsPrec :: Int -> PayloadNotSecure -> ShowS # show :: PayloadNotSecure -> String # showList :: [PayloadNotSecure] -> ShowS # | |
Exception PayloadNotSecure Source # | |
Defined in GitHub.Data.Webhooks.Secure |
isSecurePayload :: Text -> Maybe Text -> ByteString -> Bool Source #
Returns True
if the given HMAC digest (passed in the X-Hub-Signature
header)
agrees with the provided secret and request body. If not, this request may be forged.
assertSecurePayload :: Text -> Maybe Text -> ByteString -> IO () Source #
Like isSecurePayload
, but throws PayloadNotSecure
if the payload is not secure.