This is a custom feature I came up with. It works fine, but the downside I'm facing right now is that I can not limit it to specific routes, it's all or nothing. It would be nice if I could wrap my routes just like with authenticate("name") { post("/login") ... }