only import Test::Exception where it is needed
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthRealmTestApp.pm
CommitLineData
52eebd31 1package AuthRealmTestApp;
2use warnings;
3use strict;
4
692dcea4 5use Catalyst qw/
6 Authentication
7 Authentication::Store::Minimal
8/;
52eebd31 9
10use Test::More;
52eebd31 11
12our $members = {
13 bob => {
14 password => "s00p3r"
15 },
16 william => {
17 password => "s3cr3t"
18 }
19};
20
21our $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
571;
58