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