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', |
75f03cff |
30 | realms => [ 'alwaysdetach', 'other', 'members' ], |
31 | }, |
32 | alwaysdetach => { |
33 | credential => { |
34 | class => 'AlwaysDetach', |
35 | }, |
36 | store => { |
37 | class => 'Minimal', |
38 | users => {}, |
39 | }, |
714e2bdc |
40 | }, |
41 | other => { |
42 | credential => { |
43 | class => 'Password', |
44 | password_field => 'password', |
45 | password_type => 'clear' |
46 | }, |
47 | store => { |
48 | class => 'Minimal', |
49 | users => $members{other}, |
50 | } |
51 | }, |
52 | members => { |
53 | credential => { |
54 | class => 'Password', |
55 | password_field => 'password', |
56 | password_type => 'clear' |
57 | }, |
58 | store => { |
59 | class => 'Minimal', |
60 | users => $members{members}, |
61 | } |
62 | }, |
d055ce0c |
63 | }); |
714e2bdc |
64 | |
65 | __PACKAGE__->setup; |
66 | |
d055ce0c |
67 | 1; |
68 | |