Re: [Dancer-users] What's my route handler?
On Wed, Feb 15, 2012 at 10:40:36AM -0600, Franklin Bristow wrote:
While I haven't actually used it personally (my app doesn't require roles), I think that Dancer::Plugin::Auth::RBAC ( http://search.cpan.org/dist/Dancer-Plugin-Auth-RBAC/) does what you're hoping to achieve.
It appears that that needs to be told explicitly when you try to authenticate what it is that the user is trying to do, and so either the call to the authentication code needs to be done inside the route handler (cos that's what knows what the user is trying to do, but this is unnecessary duplication of code), or if I use a 'before' hook, the hook needs to be able to figure that out from the URL (which is also unnecessary duplication of code). Hence why I thought of using subroutine attributes on the route handlers. Once I've got a list of those subroutine attributes, I could well end up using that plugin to do the actual authentication. -- David Cantrell | London Perl Mongers Deputy Chief Heretic You can't spell "slaughter" without "laughter"
participants (1)
-
David Cantrell