Copyright | (c) 2018 Brandon Hamilton |
---|---|
License | MIT |
Maintainer | Brandon Hamilton <brandon.hamilton@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Middleware for WAI that uses signed secrets to verify Slack requests. See https://api.slack.com/docs/verifying-requests-from-slack
Synopsis
Documentation
verifySlackRequest :: SigningSecret -> Middleware Source #
Middleware that will verify an incoming slack request signature using the provided signing secret.
verifySlackRequest' :: SigningSecret -> FailureResponse -> Middleware Source #
Middleware that will verify an incoming slack request signature using the provided signing secret. The failure response handler will be called upon verification errors.
data VerificationFailure Source #
Verification Failure reasons
NoSignature | The request does not contain the relevant signature headers |
SignatureMismatch | Signature of the request does not match the server generated signature |
Instances
Show VerificationFailure Source # | |
Defined in Network.Wai.Middleware.SlackVerify showsPrec :: Int -> VerificationFailure -> ShowS # show :: VerificationFailure -> String # showList :: [VerificationFailure] -> ShowS # |
type FailureResponse = VerificationFailure -> Application Source #
type SigningSecret = ByteString Source #