[horde] Authentication guidance required.
Jens Wahnes
wahnes at uni-koeln.de
Sat Jul 18 20:12:43 UTC 2015
On Sat, Jul 18 2015, at 18:48:54 +0530, ANANT S ATHAVALE wrote:
> I also have an attribute attached with every user ldap entry, namely
> staffnumber and I need to give users to login using their staffnumber,
> but, it should display their original mailbox (uid).
> Can this requirement be met with existing Horde application?
Yes, it can be done though one or more hooks. If I understand your
requirements correctly, using just the preauthenticate hook will
probably suffice.
First of all, set Horde's "uid" LDAP setting back to uid. Then, you'll
have to write some code to determine if the $userId passed to the
preauthenticate function is in fact a username (uid) or if it is a
staffnumber. If it is a staffnumber, your code will have to search the
LDAP to find out the corresponding uid. Then, return the newly found
uid like this:
return array('userId' => $uidFromLdap, 'credentials' => $credentials);
If I didn't get all your requirements correctly, you may have to
implement an authusername function as well to translate usernames back
and forth.
However, apart from the question which hooks to use, there is another
thing you should consider, from my point of view: If your users don't
know their uid to login and will want to use their staffnumber because
of that instead, how will you make sure they know the password that
goes along with that uid (or staffnumber, for that matter)?
Jens
More information about the horde
mailing list