Version 0.10017
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthSessionTestApp.pm
1 package User::SessionRestoring;
2 use base qw/Catalyst::Authentication::User::Hash/;
3
4 sub for_session { $_[0]->id }
5 sub store { $_[0]->{store} }
6
7 package AuthSessionTestApp;
8 use strict;
9 use warnings;
10 use base qw/Catalyst/;
11
12 use Catalyst qw/
13     Session
14     Session::Store::Dummy
15     Session::State::Cookie
16
17     Authentication
18     Authentication::Store::Minimal
19     Authentication::Credential::Password
20 /;
21
22 our $users = {
23     foo => User::SessionRestoring->new(
24         id => 'foo',
25         password => "s3cr3t",
26     ),
27 };
28
29 __PACKAGE__->config(authentication => {users => $users});
30
31 __PACKAGE__->setup;
32
33 $users->{foo}{store} = __PACKAGE__->default_auth_store;
34
35 1;
36