Add an ou_host_name parameter for TPAC login forms
authorDan Scott <dscott@laurentian.ca>
Thu, 30 Aug 2012 14:48:32 +0000 (10:48 -0400)
committerDan Scott <dscott@laurentian.ca>
Wed, 8 May 2013 14:48:04 +0000 (10:48 -0400)
commit4514047e94a62c535ec67d9f143546709515ee87
tree94a98ee39484c5984b3ee890dcb24c1921f80a8b
parent0fe64756f4b81f981e029f995632b8bf9d749c71
Add an ou_host_name parameter for TPAC login forms

If set, and the incoming username does not already include an '@' symbol
(a very simple attempt to detect if we're already dealing with an email
address), then append '@' + the ou_host_name value to the username for
authentication purposes.

The rationale is that in a large consortium, you might want to enable
users to log in with short usernames (like 'fred'), but you also want to
avoid conflicts between short usernames at different organizational
units. Thus, create the users with the email equivalent of their
usernames, like 'fred@br1.example.com' and 'fred@br4.example.com', and
let the templates for the TPAC in br1 and br4 contain a hidden input
field to append the appropriate email hostname.

Truth be told, this is probably most appropriate for a large consortium
containing two or more academic institutions that hope to use LDAP
authentication rather than native authentication, and therefore have
LDAP CNs that map to email addresses of CN@hostname that can then be
mapped to actor.usr.usrname (and actor.usr.email, of course).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm