only import Test::Exception where it is needed
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthRealmTestApp.pm
1 package AuthRealmTestApp;
2 use warnings;
3 use strict;
4
5 use Catalyst qw/
6     Authentication
7     Authentication::Store::Minimal
8 /;
9
10 use Test::More;
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
27 __PACKAGE__->config('Plugin::Authentication' => {
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',
38                 users => $members
39             }
40         },
41         admins => {
42             credential => {
43                 class => 'Password',
44                 password_field => 'password',
45                 password_type => 'clear'
46             },
47             store => {
48                 class => 'Minimal',
49                 users => $admins
50             }
51         }
52     }
53 });
54
55 __PACKAGE__->setup;
56
57 1;
58