Skip to content

poisa/aws-php-sns-message-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon SNS message Validator for PHP

@awsforphp on Twitter Total Downloads Build Status Apache 2 License

The Amazon SNS Message Validator for PHP allows you to validate that incoming HTTP(S) messages are legitimate SNS notifications. This library does not depend on the AWS SDK for PHP or Guzzle, but it does require that the OpenSSL PHP extension be installed.

Usage

<?php

require 'vendor/autoload.php';

use Aws\Sns\Message;
use Aws\Sns\MessageValidator;
 
$message = Message::fromRawPostData();
 
// Validate the message
$validator = new MessageValidator();
if ($validator->isValid($message)) {
   // do something with the message
}

Thanks

A special thanks goes out to Julian Vidal who helped create the initial implementation in Version 2 of the AWS SDK for PHP.

About

Amazon SNS message validation for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%