Design Security in PHP Using Middleware

Enrico Zimuel Beginner

Design a secure web application is definitely not a simple task! There are many aspects to consider like how to sanitize the user input, how to provide authentication, how to manage the permissions, how to escape output, etc. Using middleware, we can simplify most of these aspects thanks to the pipeline nature of this architecture design. We'll demonstrate how to implement security by design using middleware and the PSR-7 standard.