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       user_class
69           The class used for the user object. If you don't specify a class
70           name, the default Catalyst::Authentication::User::Hash will be
71           used. If you define your own class, it must inherit from
72           Catalyst::Authentication::User::Hash.
73
74       users
75           This is a simple hash of users, the keys are the usenames, and the
76           values are hashrefs containing a password key/value pair, and
77           optionally, a roles/list of role-names pair. If using roles, you
78           will also need to add the Authorization::Roles plugin.
79
80           See the SYNOPSIS for an example.
81

METHODS

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