[dancer-users] Using Dancer::Plugin::Auth::Extensible with Dancer::Plugin::REST

Jacques Lareau jack.lareau at gmail.com
Wed Dec 11 03:00:01 GMT 2013


I already use the Dancer::Plugin::Auth::Extensible (which is very nice,
thanks!) to protect my routes.
I would like to be able to protect the routes generated with the resources
keyword.

I tried something like:

resource user =>
  get     => sub { },
  delete => require_role Admin => sub { },
...

Won't work.

D:P:Auth::Extensible seems to call the coderef passed to it.
I guess I would need the coderef returned?

Any hint?

Thanks!

--
Jacques Lareau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20131210/48758d9f/attachment.html>


More information about the dancer-users mailing list