Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

catalyst::authentication::store::minimal(3pm) [debian man page]

Catalyst::Authentication::Store::Minimal(3pm)		User Contributed Perl Documentation	     Catalyst::Authentication::Store::Minimal(3pm)

NAME
Catalyst::Authentication::Store::Minimal - Minimal authentication store SYNOPSIS
# you probably just want Store::Minimal under most cases, # but if you insist you can instantiate your own store: use Catalyst::Authentication::Store::Minimal; use Catalyst qw/ Authentication /; __PACKAGE__->config( 'Plugin::Authentication' => { default_realm => 'members', realms => { members => { credential => { class => 'Password', password_field => 'password', password_type => 'clear' }, store => { class => 'Minimal', users => { bob => { password => "s00p3r", editor => 'yes', roles => [qw/edit delete/], }, william => { password => "s3cr3t", roles => [qw/comment/], } } } } } } ); DESCRIPTION
This authentication store lets you create a very quick and dirty user database in your application's config hash. You will need to include the Authentication plugin, and at least one Credential plugin to use this Store. Credential::Password is reccommended. 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. CONFIGURATION
class The classname used for the store. This is part of Catalyst::Plugin::Authentication and is the method by which Catalyst::Authentication::Store::Minimal is loaded as the user store. For this module to be used, this must be set to 'Minimal'. users This is a simple hash of users, the keys are the usenames, and the values are hashrefs containing a password key/value pair, and optionally, a roles/list of role-names pair. If using roles, you will also need to add the Authorization::Roles plugin. See the SYNOPSIS for an example. METHODS
There are no publicly exported routines in the Minimal store (or indeed in most authentication stores) However, below is a description of the routines required by Catalyst::Plugin::Authentication for all authentication stores. new( $config, $app, $realm ) Constructs a new store object, which uses the user element of the supplied config hash ref as it's backing structure. find_user( $authinfo, $c ) Keys the hash by the 'id' or 'username' element in the authinfo hash and returns the user. ... documentation fairy stopped here. ... If the return value is unblessed it will be blessed as Catalyst::Authentication::User::Hash. from_session( $id ) Delegates to "get_user". user_supports( ) Chooses a random user from the hash and delegates to it. get_user( ) Deprecated setup( ) perl v5.14.2 2012-04-14 Catalyst::Authentication::Store::Minimal(3pm)

Check Out this Related Man Page

Catalyst::Authentication::Store::IMAP(3pm)		User Contributed Perl Documentation		Catalyst::Authentication::Store::IMAP(3pm)

NAME
Catalyst::Authentication::Store::IMAP - Authentication store accessing an IMAP server. SYNOPSIS
use Catalyst qw( Authentication ); __PACKAGE__->config( 'authentication' => { default_realm => "imap", realms => { imap => { credential => { class => "Password", password_field => "password", password_type => "self_check", }, store => { class => 'IMAP', host => 'localhost', }, }, }, }, ); sub login : Global { my ( $self, $c ) = @_; $c->authenticate({ id => $c->req->param("login"), password => $c->req->param("password") }); $c->res->body("Welcome " . $c->user->username . "!"); } DESCRIPTION
This plugin implements the Catalyst::Authentication v.10 API. Read that documentation first if you are upgrading from a previous version of this plugin. This plugin uses "Mail::IMAPClient" to let your application authenticate against an IMAP server. The used imap client object is stored on the stash as imapclient for use in other components. CONFIGURATION OPTIONS
host Sets the host name (or IP address) of the IMAP server. port Optionally set the port to connect to, defaults to 143. If you specify port 993, IO::Socket::SSL will be used for connecting. ATTRIBUTES
host The host name used to connect to. METHODS
new from_session find_user SEE ALSO
Catalyst::Authentication::Store::IMAP::User Catalyst::Plugin::Authentication, Mail::IMAPClient AUTHORS
Stefan Seifert <nine@cpan.org> LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-16 Catalyst::Authentication::Store::IMAP(3pm)
Man Page