Simplifying LDAP Logins

The Problem:
iChain is a winning tool. We use it to provide our users access to their GroupWise webmail, our Intranet and a number of other business systems. We've never installed a single product that has solved so many problems all at once. Dial-up is dead -- long live iChain!

Mind you, it comes with one big problem. As we were installing, configuring and testing it, the feedback we were getting was that typing your login in LDAP format was going to be just too hard. We needed the name to be fully qualified, but with all those ou='s and commas it was way too difficult.

The Solution:
I wrote the following javascript which converts a user-supplied "traditional" username.context format login to the LDAP cn=username,ou=department,o=company format in the background. The "username" field which iChain reads is then set to hidden. The code is activated by onChange="keypress()" in the loginid field, which provides a rather nice side-benefit: the onChange action isn't triggered when the browser form-fills the fields for the user. Using, onChange, keeps the users from getting get the error "missing some fields" when the page loads.

This solution has also helped us train our users to not leave their login credentials where others may find them!