[LON-CAPA-dev] localauth
Guy Albertelli II
lon-capa-dev@mail.lon-capa.org
Wed, 18 Jun 2003 18:28:00 -0400 (EDT)
Hi Hon-Kie,
> I finally got all the pieces together for localauth for users to
> authenticate against fsu accounts. However, when I put it in loncapa, the
> module doesn't seems to get called. Questions:
>
> 1. What does the argument after the local authentication refers to?
It can be whatever you want it to be.
Here is an example call:
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;
}
lond will call the localauth function with the username that was
entered, a cleartext copy of the password, and whatever appears after
the : in this particular students passwd file.
localauth needs to return either a 1 (correct password) or a 0
(incorrect password)
Notice the above example doesn't use the $args
> 2. What do I need to do to make sure that localauth.pm is installed?
It needs to exist in the /home/httpd/lib/perl/ directory.
remebe that lond is the one calling it, so you will need to restart
lond after making changes to localauth.pm.
--
guy@albertelli.com LON-CAPA Developer 0-7-6-9-