Download the PHP package settermjd/twilio-eventstreams-webhook-validator-slim without Composer

On this page you can find all versions of the php package settermjd/twilio-eventstreams-webhook-validator-slim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twilio-eventstreams-webhook-validator-slim

Slim v4 Twilio Event Streams Webhook Validator Middleware

testing workflow

This is a small piece of middleware for the Slim Framework (v4) that validates a Twilio Event Streams Webhook.

How Does It Work?

After adding the middleware to one or more of your application's routes, when a route is dispatched, the webhook is validated. If the webhook is valid, the next request is called. Otherwise, an HTTP 400 Bad Request is returned, along with a problem details response, formatted as JSON or XML based on the request's Accept header.

Why Use It?

You could code up the functionality yourself; and check out the tutorial on the Twilio blog if you'd like to. But, this middleware avoids the need to do so. Instead, just initialise it and add it to the relevant routes, then focus on the remaining functionality of your application.

Prerequisites

To use this middleware, you're going to need a Twilio account (either free or paid). If you are new to Twilio, create a free account.

⚡️ Quick Start

To use the middleware in your Slim (v4) application, first add the project as a dependency by running the following command:

Then, in the appropriate part of your application, initialise a new EventStreams\EventStreamsWebhookValidatorMiddleware object, which requires three parameters:

Note: The first two parameters to EventStreamsWebhookValidatorMiddleware ensure that the app's correct public URI is used as part of the webhook validation process.

Then, follow the Slim Middleware documentation to add the middleware to the respective route. Below, you can find examples of adding it as Route Middleware:

Then, replace <<THE APP'S PUBLIC URL>>" with the public URI of the application, <<THE WEBHOOK PATH>> with he path of the route that handles the webhook request, and <<YOUR TWILIO AUTH TOKEN>> with your Twilio Auth Token.

Contributing

If you want to contribute to the project, whether you have found issues with it or just want to improve it, here's how:

Did You Find The Project Useful?

If the project was useful and you want to say thank you and/or support its active development, here's how:


All versions of twilio-eventstreams-webhook-validator-slim with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0
mezzio/mezzio-problem-details Version ^1.14
psr/http-message Version ^2.0
twilio/sdk Version ^8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package settermjd/twilio-eventstreams-webhook-validator-slim contains the following files

Loading the files please wait ....