Catalyst::Plugin::Authentication::Store::Minimal - Authentication database in <$c-config>>.
<$c-
use Catalyst qw/ Authentication Authentication::Store::Minimal Authentication::Credential::Password /; __PACKAGE__->config->{authentication}{users} = { name => { password => "s3cr3t", roles => [qw/admin editor/], ... }, }; sub login : Global { my ( $self, $c ) = @_; $c->login( $c->req->param("login"), $c->req->param("password"), ); }
This authentication store plugin lets you create a very quick and dirty user database in your application's config hash.
It's purpose is mainly for testing, and it should probably be replaced by a more "serious" store for production.
The hash in the config, as well as the user objects/hashes are freely mutable at runtime.
This method will popultate $c->config->{authentication}{store} so that "default_auth_store" in Catalyst::Plugin::Authentication can use it.
$c->config->{authentication}{store}
To install Catalyst::Plugin::Authentication, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Authentication
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Authentication
For more information on module installation, please visit the detailed CPAN module installation guide.