File: TestAppAuthPlain.pm

package info (click to toggle)
libcgi-application-plugin-authentication-perl 0.25%2B~cs0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,560 kB
  • sloc: perl: 11,362; makefile: 29; javascript: 6
file content (33 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (6)
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
package TestAppAuthPlain;

use base qw(CGI::Application);
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::Authentication;

my %config = (
  DRIVER => [
    'CDBI',
    CLASS   => 'TestUsers',
    FIELD_METHODS => [qw(user plain:passphrase)]
  ],
  CREDENTIALS => [qw(auth_username auth_password)],
  STORE       => 'Session',
);

__PACKAGE__->auth->config(%config);

sub setup {
  my $self = shift;
  $self->start_mode('one');
  $self->run_modes(qw(one two));
  $self->auth->protected_runmodes(qw(two));
}

sub one {
  my $self = shift;
}

sub two {
  my $self = shift;
}
1;