implementing "middleware"

10 views
Skip to first unread message

Ian Geiser

unread,
Oct 27, 2015, 8:54:08 PM10/27/15
to Tufão
Hi, I would like to add an auth-check for routes before they are run.  In other platforms you can add these preconditions that are always called before a route is executed. Is that possible in Tufao? 

Vinícius dos Santos Oliveira

unread,
Oct 27, 2015, 9:10:26 PM10/27/15
to Tufão
015-10-27 21:54 GMT-03:00 Ian Geiser <gei...@geiseri.com>:
In other platforms you can add these preconditions that are always called before a route is executed. Is that possible in Tufao?

How does this precondition should behave?

The default tufão router[1] check for the return of the handlers and if they return false, another router is tried. In other words, it's a middleware style. You can give your feedback too, so maybe this is taken into account when designing Tufão 2.0.
Reply all
Reply to author
Forward
0 new messages