Advertisement
oylenshpeegul

hello psgi basic auth

Jul 10th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.21 KB | None | 0 0
  1. my $app = sub {
  2.     return [ 200, [ 'Content-Type' => 'text/plain' ], [ "Hello, World!\n" ] ];
  3. };
  4.  
  5. use Plack::Builder;
  6. builder {
  7.     enable "Auth::Basic", authenticator => sub {$_[1] eq 'tacoman'};
  8.     $app;
  9. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement