Commit | Line | Data |
692dcea4 |
1 | package AuthRealmTestAppCompat; |
2 | use warnings; |
3 | use strict; |
d055ce0c |
4 | use base qw/Catalyst/; |
692dcea4 |
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 | |
692dcea4 |
17 | our $members = { |
18 | bob => { |
19 | password => "s00p3r" |
20 | }, |
21 | }; |
22 | |
d055ce0c |
23 | __PACKAGE__->config('Plugin::Authentication' => { |
692dcea4 |
24 | default_realm => 'members', |
692dcea4 |
25 | members => { |
26 | credential => { |
27 | class => 'Password', |
28 | password_field => 'password', |
29 | password_type => 'clear' |
30 | }, |
31 | store => { |
32 | class => 'Minimal', |
33 | users => $members, |
34 | } |
35 | }, |
d055ce0c |
36 | }); |
692dcea4 |
37 | |
38 | __PACKAGE__->setup; |
d055ce0c |
39 | |
40 | 1; |
41 | |