[dancer-users] Authentication Question

Richard Reina gatorreina at gmail.com
Thu Oct 22 13:29:52 BST 2015


2015-10-22 0:49 GMT-05:00 Andrew Beverley <andy at andybev.com>:

> On Wed, 2015-10-21 at 19:04 -0500, Richard Reina wrote:
> > Can I forgoe more formal and extensive authentication in my case?
>
> Yes, but it would still be easier for you to use a plugin, such as
> Dancer2::Plugin::Auth::Extensible or Dancer2::Plugin::Auth::Tiny
>
> In the case of the former, all you need is as follows. It will even
> generate the login and logout routes:
>
>
> use Dancer2::Plugin::Auth::Extensible;
>
> get '/restricted' => require_login sub {
>    ...
> }
>
> plugins:
>     Auth::Extensible:
>         realms:
>             config:
>                 provider: Config
>                 users:
>                     - user: andy
>                       pass: secret # or encrypted
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>

Thanks Andy. I intend on adopting D2 Auth:Extensible in the future
especially, when I begin to have the need for roles. Appreciate the advice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20151022/c5d6fd07/attachment.html>


More information about the dancer-users mailing list