moee/sns-autoconfirm-bundle

Automatic subscription confirmation of AWS SNS HTTP(s) endpoints with Symfony (alpha)

0.0.2-alpha 2017-01-19 12:19 UTC

This package is not auto-updated.

Last update: 2024-04-13 23:56:57 UTC


README

Automatic Confirmation of AWS SNS HTTP(s) subscription messages with Symfony

Warning: Don't use this in production (yet).

This is a proof of concept in an alpha stage. It is lacking signature verification and so it is not secure. Please feel free to experiement with it and expand it, but don't use this in production.

Usage

1. Add the package:

composer require moee/sns-autoconfirm-bundle

2. Add the Bundle to your application

new Moee\SnsAutoconfirmBundle\MoeeSnsAutoconfirmBundle()

3. Annotate Endpoints

  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use Moee\SnsAutoconfirmBundle\Annotation\SnsEndpoint;
  
  class ExampleController
  {
      /**
       * @Route("/", name="index")
       * @SnsEndpoint
       */
      public function indexAction()
      {
          /* ... */
      }
 } 

If you now add this route as SNS HTTP(s) endpoint on an endpoint that is accessible for AWS, then it will automatically confirm the subscription.