Commit | Line | Data |
714e2bdc |
1 | package AuthRealmTestAppProgressive; |
2 | use warnings; |
3 | use strict; |
d055ce0c |
4 | use base qw/Catalyst/; |
714e2bdc |
5 | |
6 | ### using A::Store::minimal with new style realms |
7 | ### makes the app blow up, since c::p::a::s::minimal |
8 | ### isa c:a::s::minimal, and it's compat setup() gets |
9 | ### run, with an unexpected config has (realms on top, |
10 | ### not users). This tests makes sure the app no longer |
11 | ### blows up when this happens. |
12 | use Catalyst qw/ |
13 | Authentication |
14 | Authentication::Store::Minimal |
15 | /; |
16 | |
714e2bdc |
17 | our %members = ( |
18 | 'members' => { |
19 | bob => { password => "s00p3r" } |
20 | }, |
21 | 'other' => { |
22 | sally => { password => "s00p3r" } |
23 | }, |
24 | ); |
25 | |
d055ce0c |
26 | __PACKAGE__->config('Plugin::Authentication' => { |
714e2bdc |
27 | default_realm => 'progressive', |
28 | progressive => { |
29 | class => 'Progressive', |
30 | realms => [ 'other', 'members' ], |
31 | }, |
32 | other => { |
33 | credential => { |
34 | class => 'Password', |
35 | password_field => 'password', |
36 | password_type => 'clear' |
37 | }, |
38 | store => { |
39 | class => 'Minimal', |
40 | users => $members{other}, |
41 | } |
42 | }, |
43 | members => { |
44 | credential => { |
45 | class => 'Password', |
46 | password_field => 'password', |
47 | password_type => 'clear' |
48 | }, |
49 | store => { |
50 | class => 'Minimal', |
51 | users => $members{members}, |
52 | } |
53 | }, |
d055ce0c |
54 | }); |
714e2bdc |
55 | |
56 | __PACKAGE__->setup; |
57 | |
d055ce0c |
58 | 1; |
59 | |