1Catalyst::AuthenticatioUns:e:rStCoornet:r:iMbiuntCieamdtaalPl(ey3rs)lt:D:oAcuutmheennttaitciaotnion::Store::Minimal(3)
2
3
4

NAME

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

SYNOPSIS

9           # you probably just want Store::Minimal under most cases,
10           # but if you insist you can instantiate your own store:
11
12           use Catalyst::Authentication::Store::Minimal;
13
14           use Catalyst qw/
15               Authentication
16           /;
17
18           __PACKAGE__->config( 'Plugin::Authentication' =>
19                           {
20                               default_realm => 'members',
21                               realms => {
22                                   members => {
23                                       credential => {
24                                           class => 'Password',
25                                           password_field => 'password',
26                                           password_type => 'clear'
27                                       },
28                                       store => {
29                                           class => 'Minimal',
30                                           users => {
31                                               bob => {
32                                                   password => "s00p3r",
33                                                   editor => 'yes',
34                                                   roles => [qw/edit delete/],
35                                               },
36                                               william => {
37                                                   password => "s3cr3t",
38                                                   roles => [qw/comment/],
39                                               }
40                                           }
41                                       }
42                                   }
43                               }
44                           }
45           );
46

DESCRIPTION

48       This authentication store lets you create a very quick and dirty user
49       database in your application's config hash.
50
51       You will need to include the Authentication plugin, and at least one
52       Credential plugin to use this Store. Credential::Password is
53       reccommended.
54
55       It's purpose is mainly for testing, and it should probably be replaced
56       by a more "serious" store for production.
57
58       The hash in the config, as well as the user objects/hashes are freely
59       mutable at runtime.
60

CONFIGURATION

62       class
63           The classname used for the store. This is part of
64           Catalyst::Plugin::Authentication and is the method by which
65           Catalyst::Authentication::Store::Minimal is loaded as the user
66           store. For this module to be used, this must be set to 'Minimal'.
67
68       users
69           This is a simple hash of users, the keys are the usenames, and the
70           values are hashrefs containing a password key/value pair, and
71           optionally, a roles/list of role-names pair. If using roles, you
72           will also need to add the Authorization::Roles plugin.
73
74           See the SYNOPSIS for an example.
75

METHODS

77       There are no publicly exported routines in the Minimal store (or indeed
78       in most authentication stores)  However, below is a description of the
79       routines required by Catalyst::Plugin::Authentication for all
80       authentication stores.
81
82   new( $config, $app, $realm )
83       Constructs a new store object, which uses the user element of the
84       supplied config hash ref as it's backing structure.
85
86   find_user( $authinfo, $c )
87       Keys the hash by the 'id' or 'username' element in the authinfo hash
88       and returns the user.
89
90       ... documentation fairy stopped here. ...
91
92       If the return value is unblessed it will be blessed as
93       Catalyst::Authentication::User::Hash.
94
95   from_session( $id )
96       Delegates to "get_user".
97
98   user_supports( )
99       Chooses a random user from the hash and delegates to it.
100
101   get_user( )
102       Deprecated
103
104   setup( )
105perl v5.12.0                      20C1a0t-a0l1y-s2t2::Authentication::Store::Minimal(3)
Impressum