logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mojolicious::Plugin::BasicAuth - Basic HTTP Auth Helper

Author

       Glen Hinkle tempire@cpan.org

perl v5.34.0                                       2022-06-15                Mojolicious::Plugin::BasicAuth(3pm)

Credits

       Kirill Miazine

Description

       Mojolicous::Plugin::BasicAuth is a helper for basic http authentication.

Development

Methods

       Mojolicious::Plugin::BasicAuth inherits all methods from Mojolicious::Plugin and implements the following
       new ones.

   "register"
           $plugin->register;

       Register condition in Mojolicious application.

Name

       Mojolicious::Plugin::BasicAuth - Basic HTTP Auth Helper

See Also

       Mojolicious

Usage

           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;

Version

       0.06

See Also