in reply to Plack::Builder point to script
«Is that possible?»
Have you tried it? But I think it works - the code is practically like the example from the Plack Handbook page 22ff. From ibidem:
Just like other middleware, using Auth::Basic middleware is quite simple:
use Plack::Builder; my $app = sub { ... }; builder { enable "Auth::Basic", authenticator => sub { my($username, $password) = @_; return $username eq 'admin' && $password eq 'foobar'; }; $app; };
This adds a basic authentication to your application $app, and the user admin can sign in with the password foobar and nobody else. The successful signed-in user gets REMOTE_USER set in PSGI $env hash so it can be used in the applications and is logged using the standard AccessLog middleware.
«The Crux of the Biscuit is the Apostrophe»
|
|---|