[dancer-users] Basic authentication and Dancer

WK wanradt at gmail.com
Fri Feb 12 21:30:15 GMT 2016


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


More information about the dancer-users mailing list