Monday, 26 August 2013

IronRouter authorisation controller

IronRouter authorisation controller

I'm wondering if anyone could demonstrate how to use a global 'before'
action on a router controller class that handles user authentication and
displays the appropriate route/template based on the result.
My use case is to have an AppController that acts as an authentication
firewall and blocks any child controller actions when a user is logged
out. E.g.
// Create a primary app controller stub with the auth firewall
AppController = RouteController.extend({});
// Extend the AppController with all the other app routes
MainController = AppController.extend({});
Any help would be appreciated!

No comments:

Post a Comment