File: SimpleAuth.pm

package info (click to toggle)
libapache2-sitecontrol-perl 1.05-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, forky, sid, trixie
  • size: 208 kB
  • sloc: perl: 558; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package SimpleAuth;

use 5.008;
use strict;
use warnings;

sub check_credentials
{
   my $r    = shift;  # Apache request object
   my $username = shift;
   my $password = shift;

   return 1 if($username eq 'admin' && $password eq 'test');
   return 1 if($username eq 'user' && $password eq 'test');

   return 0;
}

1;