Mojolicious::Plugin::ParamsAuth
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Mojolicious/Plugin
t
.gitignore
Changes
Mojolicious-Plugin-ParamsAuth-0.03.tar.gz
README.pod
dist.ini

README.pod

NAME

Mojolicious::Plugin::ParamsAuth - URL Parameters Auth Helper

DESCRIPTION

Mojolicous::Plugin::ParamsAuth is a helper for authenticating using url parameters

USAGE

# Request:
GET /?userinput=username&passinput=password


use Mojolicious::Lite;

plugin 'params_auth';

get '/' => sub {
    my $self = shift;

    return $self->render_text('ok')
      if $self->params_auth(userinput => passinput =>
          sub { return 1 if "@_" eq 'username password' });
};

app->start;

Any number of parameters can be specified:

$self->params_auth( one => two => three => four => sub { } )

The subroutine callback receives form values as the parameter list.

METHODS

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

register

$plugin->register;

Register condition in Mojolicious application.

SEE ALSO

Mojolicious

DEVELOPMENT

http://github.com/tempire/mojolicious-plugin-paramsauth

VERSION

0.01

AUTHOR

Glen Hinkle tempire@cpan.org