| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Amazon.SNS.Verify
Synopsis
- verifySNSMessage :: MonadIO m => Value -> m Text
- verifySNSMessageEither :: MonadIO m => Value -> m (Either SNSNotificationValidationError Text)
- verifySNSMessageJSON :: (FromJSON a, MonadIO m) => Value -> m a
- verifySNSMessageJSONEither :: (FromJSON a, MonadIO m) => Value -> m (Either SNSNotificationValidationError a)
- data SNSNotificationValidationError
Documentation
verifySNSMessage :: MonadIO m => Value -> m Text Source #
Decode and verify an SNS message
This function follows the process outlined in the following:
https://docs.aws.amazon.com/sns/latest/dg/sns-verify-signature-of-message.html
A JSON payload is:
- Parsed as an SNS message type
Notification,SubscriptionConfirmation, orUnsubscribeConfirmation. - Verified against its signature.
- And in the case of subscription events responded to.
verifySNSMessageEither :: MonadIO m => Value -> m (Either SNSNotificationValidationError Text) Source #
verifySNSMessageJSON :: (FromJSON a, MonadIO m) => Value -> m a Source #
Decode and verify an SNS message as JSON
The same as verifySNSMessage, but decodes the message as JSON.
verifySNSMessageJSONEither :: (FromJSON a, MonadIO m) => Value -> m (Either SNSNotificationValidationError a) Source #
data SNSNotificationValidationError Source #
Constructors