When working with Katana Project we deal a lot with middlewares. On ASP.NET website they say
As previously mentioned, when the server accepts a request from a client, it is responsible for passing it through a pipeline of OWIN components, which are specified by the developer’s startup code. These pipeline components are known as middleware.
That's fine but I quite don't get it. At first I thought that middlewares were the ASP.NET components like WebAPI, SignalR and all of that. However, when studying authentication I saw the Cookie Authentication Middleware. This one is not an entire framework like WebAPI so it doesn't fit my initial idea of middleware.
So what Katana middlewares really are? They are just pieces of code that can be integrated on the execution pipeline and do work on the environment dictionary? And so, they can be simple components like an authentication middleware or interfaces to communicate with entire frameworks like WebAPI?