Commit | Line | Data |
a3bf437a |
1 | package AuthTestApp; |
d055ce0c |
2 | use strict; |
3 | use warnings; |
4 | use base qw/Catalyst/; |
a3bf437a |
5 | use Catalyst qw/ |
fb90f091 |
6 | Authentication |
7 | Authentication::Store::Minimal |
8 | Authentication::Credential::Password |
a3bf437a |
9 | /; |
10 | |
a3bf437a |
11 | use Digest::MD5 qw/md5/; |
12 | use Digest::SHA1 qw/sha1_base64/; |
13 | |
d055ce0c |
14 | our $users = { |
15 | foo => { |
16 | password => "s3cr3t", |
17 | }, |
18 | bar => { |
19 | crypted_password => crypt("s3cr3t", "x8"), |
20 | }, |
21 | gorch => { |
22 | hashed_password => md5("s3cr3t"), |
23 | hash_algorithm => "MD5", |
24 | }, |
25 | shabaz => { |
26 | hashed_password => sha1_base64("s3cr3t"), |
27 | hash_algorithm => "SHA-1" |
28 | }, |
29 | sadeek => { |
30 | hashed_password => sha1_base64("s3cr3t").'=', |
31 | hash_algorithm => "SHA-1" |
32 | }, |
33 | baz => {}, |
34 | }; |
a3bf437a |
35 | |
d055ce0c |
36 | __PACKAGE__->config('Plugin::Authentication' =>{users => $users}); |
a3bf437a |
37 | |
d055ce0c |
38 | __PACKAGE__->setup; |
a3bf437a |
39 | |
d055ce0c |
40 | 1; |
a3bf437a |
41 | |