Add authentication
[plack-app-gruntmaster.git] / app.psgi
1 #!/usr/bin/perl -w
2 use v5.14;
3
4 use Apache2::Authen::Passphrase qw/pwcheck/;
5 use Plack::App::Gruntmaster;
6 use Plack::Builder;
7 use Plack::Request;
8
9 sub some_auth_required {
10 my $r = Plack::Request->new($_[0]);
11 0
12 }
13
14 builder {
15 enable 'Static', path => qr,/static/,;
16 enable 'Log4perl', category => 'plack', conf => 'log.conf';
17 enable_if \&some_auth_required, 'Auth::Basic', authenticator => sub { eval {pwcheck @_; 1} }, realm => 'Gruntmaster 6000';
18 Plack::App::Gruntmaster->to_app
19 }
This page took 0.024681 seconds and 5 git commands to generate.