Go to the FreeLists Home Page Home Signup Help Login
 



[dokuwiki] || [Date Prev] [03-2007 Date Index] [Date Next] || [Thread Prev] [03-2007 Thread Index] [Thread Next]

[dokuwiki] Re: Mixed / chained authentication (LDAP + plain)

  • From: DennisV <dennisv.ut@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 13 Mar 2007 11:48:41 +0100
Hi. This intrigued me so I wrote something really simple -
http://wiki.splitbrain.org/wiki:tips:chainedauth

Thanks a lot!

I tried it and it seems to work with ldap:plain as well. One small
problem I found that it gives an error when you try to log on using a
non-existing user. I solved it by replacing:

 function checkPass($user,$pass) {
   return $this->getAuthFromUser($user)->checkPass($user,$pass);
 }

with

 function checkPass($user,$pass) {
   $result = false;
   $auth = $this->getAuthFromUser($user);
   if($auth != null) {
     $result = $auth->checkPass($user,$pass);
   }
   return $result;
 }

I did notice something else however. If I turn LDAP debug on:
$conf['auth']['ldap']['debug']         = true;
I notice a lot of calls to the LDAP after logging on. 3 in the page
header and 1 where the admin button is located. Consequent page clicks
have an LDAP call on each page near the admin button. This doesn't
happen when using pure LDAP authentication. Is there any way to
optimize this?

Regards,
Dennis
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist




[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.