[LON-CAPA-dev] localauth.pm
Guy Albertelli II
lon-capa-dev@mail.lon-capa.org
Mon, 24 Mar 2003 16:42:49 -0500 (EST)
Hi Hon-Kie,
> Is there a complete localauth.pm that shows how to do that local
> authentication? I need to implement one for FSU.
this is what is in use at Simon Fraser University:
# The LON-CAPA dummy localauthentication mechnism
# 8/24 Guy Albertelli
package localauth;
# ----START LOCAL CHANGES HERE ----- DON'T DELETE THIS LINE
use strict;
use ckid;
sub localauth {
my ($uname,$upass,$args)= @_;
my ($correct,$msg)=&ckid::unsecurecheckid($uname,$upass,1,0);
#unsecurecheckid is backwards from us.
if ($correct eq 0) { return 1; }
return 0;
}
# ----END LOCAL CHANGES HERE ----- DON'T DELETE THIS LINE
1;
__END__
lond is expecting &localauth::localauth to return a 1 if the use is
authenticated and 0 if the user fails to be authenticated
$uname is the user name $upass is the password in plain text, $args is
whatever follows the : in the users passwd file.
--
guy@albertelli.com LON-CAPA Developer 0-7-7-1-