2017 © Pedro Peláez
 

library lumen-sns-middleware

Collection of middleware and helpers for dealing with AWS SNS notifications

image

digiaonline/lumen-sns-middleware

Collection of middleware and helpers for dealing with AWS SNS notifications

  • Thursday, April 19, 2018
  • by Jalle19
  • Repository
  • 7 Watchers
  • 1 Stars
  • 2,337 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 109 % Grown

The README.md

lumen-sns-middleware

Build Status Scrutinizer Code Quality Coverage Status, (*1)

This library contains a collection of middleware and helpers for dealing with AWS SNS notifications., (*2)

Features

  • a middleware for validating the signatures of SNS notifications
  • middleware for transparently handling subscription and unsubscribe confirmations
  • a factory for creating SNS Message objects from HttpFoundation request objects (which Lumen uses)
  • a basic enum class for notification types

Requirements

  • PHP >= 7.0
  • Lumen >= 5.5

Installation

Add the library as a dependency:, (*3)

composer require digiaonline/lumen-sns-middleware 

Register the service provider:, (*4)

$app->register(Digia\Lumen\SnsMiddleware\Providers\SnsMiddlewareServiceProvider::class);

Usage

Apply any of the following middleware to your routes:, (*5)

  • MessageValidatorMiddleware - validates requests and throws an exception they don't contain a valid SNS message
  • HandleSubscriptionConfirmationMiddleware - automatically confirms SubscriptionConfirmation messages
  • HandleUnsubscribeConfirmationMiddleware - automatically confirms UnsubscribeConfirmation messages

Using a custom HTTP client

If for some reason you need to use a custom HTTP client when validating messages or confirming subscription/unsubscribe messages, bind an implementation of HttpClientInterface to your container, e.g.:, (*6)

$app->bind(HttpClientInterface::class, MyImplementation::class);

License

MIT, (*7)

Testing

Run composer test, (*8)

The Versions

19/04 2018

dev-master

9999999-dev

Collection of middleware and helpers for dealing with AWS SNS notifications

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sam Stenvall

lumen aws sns

19/04 2018

1.0.1

1.0.1.0

Collection of middleware and helpers for dealing with AWS SNS notifications

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sam Stenvall

lumen aws sns

09/10 2017

1.0.0

1.0.0.0

Collection of middleware and helpers for dealing with AWS SNS notifications

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sam Stenvall

lumen aws sns