[dancer-users] Basic authentication and Dancer
Nikos Vaggalis
nikos.vaggalis at gmail.com
Fri Feb 12 21:54:32 GMT 2016
those variables get filled with the values you enter in the Authentication
dialogue when it asks for a username and password
On Fri, Feb 12, 2016 at 11:30 PM, WK <wanradt at gmail.com> wrote:
> Hi!
>
> 2016-02-12 23:25 GMT+02:00 Nikos Vaggalis <nikos.vaggalis at gmail.com>:
>
> > you could use Plack::Builder;
> >
> > append the following inside your app.psgi file
> >
> > use Plack::Builder;
> >
> > builder {
> > enable "Auth::Basic", authenticator => \&authen_cb;
> > }
> >
> > sub authen_cb {
> > my($username, $password, $env) = @_;
> > return ($username eq 'testuser' && $password eq 'testpassword')
> > }
>
> Thank you for quick response. As I see, it provides full
> authentication capabilities itself, but I still don't figure out, how
> I could see the value of $username inside my app?
>
> --
> Wbr,
> Kõike hääd,
>
> Gunnar
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20160212/a8c95d95/attachment.html>
More information about the dancer-users
mailing list