[LON-CAPA-admin] Authentication: more than one LDAP server?

Guy Albertelli II guy at albertelli.com
Tue Jul 31 13:26:38 EDT 2007


On Tue, Jul 31, 2007 at 06:20:10PM +0200, Stefan Bisitz wrote:
> H. K. Ng wrote:
> > As far as I know, there is no attribute to specify which server to 
> > use for a user.
> 
> Hm, what about the argument in the Login data: "Local Authentication
> with argument [...]"? Maybe the content is passed to localauth which can
> decide which LDAP server should be used?
> 

Yes. That is precisely why the optional argument exists and it is
passed to the localauth routine, as argument #3, copy and paste of the
locauth.pm file :


# The localauth routine receives
# - the typed in username
# - the typed in password
# - the optional information that was stored when the authentication 
#   mechanism was specified 
# - the domain that was typed in
# It is expected to return a 1 if the user is authenticated and a 0
# otherwise
# it can optionally return a negative value for an error
# condition. This
# negative value will get logged along with the user that caused it
sub localauth {
    my ($username,$password,$optional_argument,$domain) = @_;
    return 0;
}

-- 
guy at albertelli.com   0-7-0-9-27,137



More information about the LON-CAPA-admin mailing list