Trim whitespace
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / RemoteTestApp2.pm
1 package RemoteTestApp2;
2 use strict;
3 use warnings;
4
5 use Catalyst qw/
6    Authentication
7 /;
8
9 use base qw/Catalyst/;
10 unless ($Catalyst::VERSION >= 5.89000) {
11     __PACKAGE__->engine_class('RemoteTestEngine');
12 }
13 __PACKAGE__->config(
14     'Plugin::Authentication' => {
15         default_realm => 'remote',
16         realms => {
17             remote => {
18                 credential => {
19                     class => 'Remote',
20                     allow_regexp => '^(bob|john|CN=.*)$',
21                     deny_regexp=> 'denied',
22                     cutname_regexp=> 'CN=(.*)/OU=Test',
23                     source => 'SSL_CLIENT_S_DN',
24                     username_field => 'my_user_name',
25                 },
26                 store => {
27                     class => 'Null',
28                 },
29             },
30         },
31     },
32 );
33 __PACKAGE__->setup;
34 if ($Catalyst::VERSION >= 5.89000) {
35     require RemoteTestEngineRole;
36     RemoteTestEngineRole->meta->apply(__PACKAGE__->engine);
37 }
38
39 1;
40