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