Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype SlackSigningSecret = SlackSigningSecret ByteString
- newtype SlackSignature = SlackSignature ByteString
- newtype SlackRequestTimestamp = SlackRequestTimestamp ByteString
- data SlackVerificationFailed
- = VerificationMissingTimestamp
- | VerificationMalformedTimestamp ByteString
- | VerificationTimestampOutOfRange Int
- | VerificationMissingSignature
- | VerificationUnknownSignatureVersion ByteString
- | VerificationMalformedSignature String
- | VerificationUndecodableSignature ByteString
- | VerificationSignatureMismatch
- | VerificationCannotParse Text
- validateRequest :: (MonadIO m, FromJSON a) => SlackSigningSecret -> SlackSignature -> SlackRequestTimestamp -> ByteString -> m (Either SlackVerificationFailed a)
- validateRequest' :: FromJSON a => NominalDiffTime -> SlackSigningSecret -> SlackSignature -> SlackRequestTimestamp -> ByteString -> Either SlackVerificationFailed a
Documentation
newtype SlackSigningSecret Source #
Slack generated Signing Secret placed into configuration. See https://api.slack.com/authentication/verifying-requests-from-slack#signing_secrets_admin_page
Instances
Show SlackSigningSecret Source # | |
Defined in Web.Slack.Experimental.RequestVerification showsPrec :: Int -> SlackSigningSecret -> ShowS # show :: SlackSigningSecret -> String # showList :: [SlackSigningSecret] -> ShowS # | |
Eq SlackSigningSecret Source # | |
Defined in Web.Slack.Experimental.RequestVerification (==) :: SlackSigningSecret -> SlackSigningSecret -> Bool # (/=) :: SlackSigningSecret -> SlackSigningSecret -> Bool # |
newtype SlackSignature Source #
Instances
Show SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification showsPrec :: Int -> SlackSignature -> ShowS # show :: SlackSignature -> String # showList :: [SlackSignature] -> ShowS # | |
Eq SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification (==) :: SlackSignature -> SlackSignature -> Bool # (/=) :: SlackSignature -> SlackSignature -> Bool # | |
FromHttpApiData SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification parseUrlPiece :: Text -> Either Text SlackSignature # parseHeader :: ByteString -> Either Text SlackSignature # parseQueryParam :: Text -> Either Text SlackSignature # |
newtype SlackRequestTimestamp Source #
Instances
data SlackVerificationFailed Source #
Instances
validateRequest :: (MonadIO m, FromJSON a) => SlackSigningSecret -> SlackSignature -> SlackRequestTimestamp -> ByteString -> m (Either SlackVerificationFailed a) Source #
validateRequest' :: FromJSON a => NominalDiffTime -> SlackSigningSecret -> SlackSignature -> SlackRequestTimestamp -> ByteString -> Either SlackVerificationFailed a Source #
Pure version of validateRequest
. Probably only useful for tests.