| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Web.Slack.Experimental.RequestVerification
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
Constructors
| SlackSigningSecret ByteString |
Instances
| Show SlackSigningSecret Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods showsPrec :: Int -> SlackSigningSecret -> ShowS # show :: SlackSigningSecret -> String # showList :: [SlackSigningSecret] -> ShowS # | |
| Eq SlackSigningSecret Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods (==) :: SlackSigningSecret -> SlackSigningSecret -> Bool # (/=) :: SlackSigningSecret -> SlackSigningSecret -> Bool # | |
newtype SlackSignature Source #
Constructors
| SlackSignature ByteString |
Instances
| Show SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods showsPrec :: Int -> SlackSignature -> ShowS # show :: SlackSignature -> String # showList :: [SlackSignature] -> ShowS # | |
| Eq SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods (==) :: SlackSignature -> SlackSignature -> Bool # (/=) :: SlackSignature -> SlackSignature -> Bool # | |
| FromHttpApiData SlackSignature Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods parseUrlPiece :: Text -> Either Text SlackSignature # parseHeader :: ByteString -> Either Text SlackSignature # parseQueryParam :: Text -> Either Text SlackSignature # | |
newtype SlackRequestTimestamp Source #
Constructors
| SlackRequestTimestamp ByteString |
Instances
| Show SlackRequestTimestamp Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods showsPrec :: Int -> SlackRequestTimestamp -> ShowS # show :: SlackRequestTimestamp -> String # showList :: [SlackRequestTimestamp] -> ShowS # | |
| Eq SlackRequestTimestamp Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods (==) :: SlackRequestTimestamp -> SlackRequestTimestamp -> Bool # (/=) :: SlackRequestTimestamp -> SlackRequestTimestamp -> Bool # | |
| FromHttpApiData SlackRequestTimestamp Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods parseUrlPiece :: Text -> Either Text SlackRequestTimestamp # parseHeader :: ByteString -> Either Text SlackRequestTimestamp # parseQueryParam :: Text -> Either Text SlackRequestTimestamp # | |
data SlackVerificationFailed Source #
Constructors
Instances
| Exception SlackVerificationFailed Source # | |
| Show SlackVerificationFailed Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods showsPrec :: Int -> SlackVerificationFailed -> ShowS # show :: SlackVerificationFailed -> String # showList :: [SlackVerificationFailed] -> ShowS # | |
| Eq SlackVerificationFailed Source # | |
Defined in Web.Slack.Experimental.RequestVerification Methods (==) :: SlackVerificationFailed -> SlackVerificationFailed -> Bool # (/=) :: SlackVerificationFailed -> SlackVerificationFailed -> Bool # | |
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.