Thoughts and Patterns of a Developer

List of Slim 3 middlewares

October 27, 2015

Recently folks have been asking about what middlewares are available for Slim 3. Although Slim 3 is still in RC stage, there have been a number of developers who have decided to create middlewares already. Here I am going to list the ones I think are beneficial to the community and to keep an eye on.

Before I continue, do note that most PSR7 middlewares should work with Slim 3, we have intentionally not included an Interface for PSR7 middlewares in order to keep the PHP eco-system healthy. We also promote the use of PSR7 methods in middlewares and not use Slim specific methods where possible.

List of Middlewares


Mika Tuupola’s Basic Auth has been around since Slim 2 and now have a new 2.x branch for Slim 3, this library includes different authenticator stores (array, db or create your own) out of the box.

Mika Tuupola’s JSON Web Token Authentication has also been around since Slim 2 and now have a new 2.x branch for Slim 3.

Content Negotiation

Ryan Szrama’s Negotiation middleware for Slim 3, which makes use of Will Durand Negotiation library.

Http Cache

There is a HTTP Cache middleware that was created by the Slim Team.


Another one from the Slim Team is the CSRF middleware.

If you know of any other middleware not listed here that you would like to be listed, please leave a comment below with a link to the repository. Please note that I am only listing middlewares here, not service providers that you can add into Slim 3, hence why I didn’t list the Twig-View and others.

I am a freelance web developer who works under the name Silent Works. I work on various open source project and try to evolve with new technologies as they arrive.

comments powered by Disqus