GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

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

Catalyst::Authentication::Store::Minimal - Minimal authentication store

    # 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/],
                                        }
                                    }
                                }
                            }
                        }
                    }
    );

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.

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'.
user_class
The class used for the user object. If you don't specify a class name, the default Catalyst::Authentication::User::Hash will be used. If you define your own class, it must inherit from Catalyst::Authentication::User::Hash.
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.

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.

Constructs a new store object, which uses the user element of the supplied config hash ref as it's backing structure.

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.

Delegates to "get_user".

Chooses a random user from the hash and delegates to it.

Deprecated

2012-06-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.