Mojolicious::Plugin::BasicAuth - Basic HTTP Auth Helper
Mojolicous::Plugin::BasicAuth is a helper for basic http authentication.
use Mojolicious::Lite; plugin 'basic_auth'; get '/' => sub { my $self = shift; return $self->render_text('ok') if $self->basic_auth( realm => sub { return 1 if "@_" eq 'username password' } ); }; app->start;
Mojolicious::Plugin::BasicAuth inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register condition in Mojolicious application.
Mojolicious
http://github.com/tempire/mojolicious-plugin-basicauth
0.06
Glen Hinkle <tempire@cpan.org>
To install Mojolicious::Plugin::BasicAuth, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::BasicAuth
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::BasicAuth
For more information on module installation, please visit the detailed CPAN module installation guide.