Classic ring handlers are hard to test and 99% of time are impure functions. The classic ring handler goes like this: Add dependencies (DB connection, client with internal secret, etc) to the request ...
The line between middleware and application software is blurred, which is why this chapter introduces both together. Middleware is software that has been abstracted out of the application layer for a ...
In this first example code, I think the comment is bit confusing. It says it's not secure and it's the recommended approach as well. However, it's actually doing a full session lookup from the ...