File: AuthDigestDotnetTestApp.pm

package info (click to toggle)
libcatalyst-authentication-credential-http-perl 1.018-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 404 kB
  • sloc: perl: 656; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (5)
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
42
package AuthDigestDotnetTestApp;
use Catalyst qw/
    Authentication
    Cache
/;

our %users;
my $digest_pass = Digest::MD5->new;
$digest_pass->add('Mufasa2:testrealm@host.com:Circle Of Life');
%users = (
        Mufasa  => { pass         => "Circle Of Life",          },
        Mufasa2 => { pass         => $digest_pass->hexdigest, },
);
__PACKAGE__->config(
    cache => {
        backend => {
            class => 'Cache::FileCache',
        },
    },
    authentication => {
        default_realm => 'testrealm@host.com',
        realms => {
            'testrealm@host.com' => {
                store => {
                    class => 'Minimal',
                    users => \%users,
                },
                credential => {
                    class => 'HTTP',
                    type  => 'digest',
                    password_type => 'clear',
                    password_field => 'pass',
                    broken_dotnet_digest_without_query_string => 1,
                },
            },
        },
    },
);
__PACKAGE__->setup;

1;