File: AuthTestApp.pm

package info (click to toggle)
libcatalyst-plugin-authentication-perl 0.10024-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 508 kB
  • sloc: perl: 1,531; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 808 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package AuthTestApp;
use strict;
use warnings;
use base qw/Catalyst/;
use Catalyst qw/
    Authentication
    Authentication::Store::Minimal
    Authentication::Credential::Password
/;

use Digest::MD5 qw/md5/;
use Digest::SHA qw/sha1_base64/;

our $users = {
    foo => {
        password => "s3cr3t",
    },
    bar => {
        crypted_password => crypt("s3cr3t", "x8"),
    },
    gorch => {
        hashed_password => md5("s3cr3t"),
        hash_algorithm => "MD5",
    },
    shabaz => {
        hashed_password => sha1_base64("s3cr3t"),
        hash_algorithm => "SHA-1"
    },
    sadeek => {
        hashed_password => sha1_base64("s3cr3t").'=',
        hash_algorithm => "SHA-1"
    },
    baz => {},
};

__PACKAGE__->config('Plugin::Authentication' =>{users => $users});

__PACKAGE__->setup;

1;