aws-sns-verify-0.0.0.3: Parse and verify AWS SNS messages
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazon.SNS.Verify

Synopsis

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:

  1. Parsed as an SNS message type Notification, SubscriptionConfirmation, or UnsubscribeConfirmation.
  2. Verified against its signature.
  3. And in the case of subscription events responded to.

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.