Version 0.10017
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / AuthSessionTestApp.pm
CommitLineData
a3bf437a 1package User::SessionRestoring;
5c5af345 2use base qw/Catalyst::Authentication::User::Hash/;
a3bf437a 3
4sub for_session { $_[0]->id }
5sub store { $_[0]->{store} }
6
7package AuthSessionTestApp;
d055ce0c 8use strict;
9use warnings;
10use base qw/Catalyst/;
11
a3bf437a 12use 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 22our $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
351;
36