login/login pages and cookie/session-based auth
[freeside.git] / FS / FS / Auth / legacy.pm
1 package FS::Auth::legacy;
2 #use base qw( FS::Auth ); #::internal ?
3
4 use strict;
5 use Apache::Htpasswd;
6
7 #substitute in?  we're trying to make it go away...
8 my $htpasswd_file = '/usr/local/etc/freeside/htpasswd';
9
10 sub authenticate {
11   my($self, $username, $check_password ) = @_;
12
13   Apache::Htpasswd->new( { passwdFile => $htpasswd_file,
14                            ReadOnly   => 1,
15                          }
16     )->htCheckPassword($username, $check_password);
17 }
18
19 #don't support this in legacy?  change in both htpasswd and database like 3.x
20 # for easier transitioning?  hoping its really only me+employees that have a
21 # mismatch in htpasswd vs access_user, so maybe that's not necessary
22 #sub change_password {
23 #}
24
25 1;