Commit | Line | Data |
52eebd31 |
1 | package AuthRealmTestApp; |
2 | use warnings; |
3 | use strict; |
4 | |
692dcea4 |
5 | use Catalyst qw/ |
6 | Authentication |
7 | Authentication::Store::Minimal |
8 | /; |
52eebd31 |
9 | |
10 | use Test::More; |
52eebd31 |
11 | |
12 | our $members = { |
13 | bob => { |
14 | password => "s00p3r" |
15 | }, |
16 | william => { |
17 | password => "s3cr3t" |
18 | } |
19 | }; |
20 | |
21 | our $admins = { |
22 | joe => { |
23 | password => "31337" |
24 | } |
25 | }; |
26 | |
d055ce0c |
27 | __PACKAGE__->config('Plugin::Authentication' => { |
52eebd31 |
28 | default_realm => 'members', |
29 | realms => { |
30 | members => { |
31 | credential => { |
32 | class => 'Password', |
33 | password_field => 'password', |
34 | password_type => 'clear' |
35 | }, |
36 | store => { |
37 | class => 'Minimal', |
d055ce0c |
38 | users => $members |
52eebd31 |
39 | } |
40 | }, |
41 | admins => { |
42 | credential => { |
43 | class => 'Password', |
44 | password_field => 'password', |
45 | password_type => 'clear' |
46 | }, |
47 | store => { |
48 | class => 'Minimal', |
d055ce0c |
49 | users => $admins |
52eebd31 |
50 | } |
51 | } |
52 | } |
d055ce0c |
53 | }); |
52eebd31 |
54 | |
55 | __PACKAGE__->setup; |
d055ce0c |
56 | |
57 | 1; |
58 | |