flatiron / director

a tiny and isomorphic URL router for JavaScript
http://github.com/flatiron/director
MIT License
5.6k stars 486 forks source link

how can we add passport authentication to all routes in director ? #252

Open koraysels opened 10 years ago

koraysels commented 10 years ago

with express we could do somthing like

routes.all('/protected/*', ensureAuthenticated, function (req, res) { });

how can we achieve this in director?

koraysels commented 9 years ago

I did this with the before: option where you define your routes