Commit | Line | Data |
d1ba091f |
1 | package stemmaweb::Model::User; |
2 | use strict; |
3 | use warnings; |
4 | use Moose; |
5 | use Text::Tradition::UserStore; |
6 | |
7 | extends 'Catalyst::Model::KiokuDB'; |
8 | |
9 | has '+model_class' => ( default => 'Text::Tradition::UserStore' ); |
10 | |
d7816ff4 |
11 | =head1 NAME |
12 | |
13 | stemmaweb::Model::User - User/Auth KiokuDB model for stemmaweb |
14 | |
15 | =head1 SYNOPSIS |
16 | |
17 | ## CONFIGURATION, in .conf file (this is the default setting) |
18 | <Model::User> |
19 | model_class Text::Tradition::UserStore |
20 | </Model::User> |
21 | |
22 | <Plugin::Authentication> |
23 | <default> |
24 | <credential> |
25 | class 'Password' |
26 | password_field 'password' |
27 | password_type 'self_check' |
28 | </credential> |
29 | <store> |
30 | class 'Model::KiokuDB' |
31 | model_name 'User' |
32 | </store> |
33 | </default> |
34 | </Plugin::Authentication> |
35 | |
36 | |
37 | =head1 DESCRIPTION |
38 | |
39 | This is the User Model used as a Authentication Store (using |
40 | ::Store::Model::KiokuDB) for stemmaweb user authentication. |
41 | |
42 | This separate model allows us to have self-contained user storage, |
43 | which is replaceable. The default uses Text::Tradition::UserStore and |
44 | stores the Users alongside the Traditions. |
45 | |
46 | To replace the source of users for authentication, add the |
47 | configuration shown in the L</SYNOPSIS> to your stemmaweb.conf file, |
48 | and adjust as necessary. |
49 | |
d1ba091f |
50 | 1; |