Intranet Journal
The online resource for intranet professionals
Customizing Login Forms on your Domino Intranet
7/22/2008
Lotus Domino is a wonderful web server to use for your intranet. The power you can bring with the Domino development platform is fairly evident, and hopefully we’ve documented that here for you over the years.
One aspect of the web server that is pretty lacking however is the default login forms for web applications. By default you will see the following pop-up login when accessing a secure application on your intranet:
It’s okay, but hardly awe-inspiring. Then, if you set up session-based authentication on your server, you get this default:
Wow, how awesomely cool is that? Would your users look at that and know they were logging into your site? Probably not. It’s not branded, and completely devoid of any style. By adding a configuration database and adding a simple form, you can make the experience so much better.
Creating the Domino Configuration database
In order to get custom login pages, the server or website you wish to create the custom login form for needs to have session authentication turned on. (Check with your administrator to make sure that is the case.) Once you've verified that your site is using session authentication, you also need to create a Domino Web Configuration database. This database allows you to customize login forms as well as error messages (which we won’t get into in this article.)
To create the Domino Web Configuration database, do the following:
Click File, Application (Database), New Choose the server you are putting the configuration database on Enter a title (i.e. Domino Web Configuration) Enter domcfg.nsf as the filename Choose the server you are putting the configuration database on Go to the bottom of the dialog and Click the Show Advanced Templates checkbox Choose the Domino Web Server Configuration template Click OK
Once the database is created, give Reader access to the Anonymous user in the database's access control list (ACL.)
Now that the database is in place, restart the HTTP task on your Domino server. It will pick up on the fact that there is now a domcfg.nsf. By default, when you log into the server you will now get this slightly better login prompt.
Better, but the whole reason for this exercise is to make the page customized to your environment.
Adding a custom login form
For this part you’ll have to get your developer involved. We’re going to look at the form that was used to create the slightly better login prompt we just saw. In the database it’s listed as $$LoginUserForm and is the default form. Opening it up in Domino Designer shows the form like this:
It’s just a basic Notes form with a couple fields and a submit button. There is a username and a password field which are both pretty self explanatory. The sign-in button can have anything to label it (like “login” or “enter”) and it’s the button the user presses to submit the form.
$PublicAccess needs to be set to “1” so people can see the form to login, and ReasonType is a temp field to store error messages during the login.
Lastly, there is a ComputedValue field that has a bunch of code to generate those error messages. The error messages address issues such as whether someone isn’t authorized to access the application they are trying to log into or has the wrong username/password combo.
The simplest way to customize the login page is to replace the picture of the key with your own graphic. It could be your company logo or anything you wish. You don’t have to stop at that however. You can design the form any way you like as long as you still have those fields.
As the $$LoginUserForm is the default form, that’s what will be displayed when someone authenticates against your web server. You can create as many login pages as you wish and can even do it per website hosted on the server.
Multiple Login Pages
Let's say you host multiple websites on your server like I showed you how to do here last September. You might want to create a custom login page for each one. Domino is perfectly capable of handling that.
First, use Domino Designer and make a copy of the $$LoginUserForm and name it appropriately. For example, I’ll name mine SalesWebsiteLogin. Then customize the form like we’ve outlined above and add any text, colors or logos you might want. Now save the form.
You have the new custom form ready to go, but you need to tell the Domino Web Configuration database to use that form for your sales application.
Use Lotus Notes to open the domcfg.nsf database that we created at the beginning of the article. On the left side of the database choose the Sign In Form Mapping view. Click the Add Mapping button In the Applies To: field, choose Specific Web Site/Virtual Server. (If you wanted the form to be used for every website on the server, you can choose All Web Sites/Entire Server.) In Web Site/VIrtual Server: enter your website’s domain name. For this we’ll use sales.acme.com In the Target Database: field enter domcfg.nsf In the Target Form: field enter the name of your form (i.e. SalesWebsiteLogin) Click Save & Close Restart the HTTP task on your web server
What we just did above was to tell Domino that if anyone tries to authenticate against the sales.acme.com website, it will use the SalesWebsiteLogin form that you created to authenticate them. You can do this for any site on your server, or if you want one consistent customized page, you can do it that way as well.
Branding is Better Baby!
Customizing your login form is a great way to add branding to your site. It helps with first impressions of not only your website, but for Domino as an intranet platform as well. Don’t have your killer website experience diminished by bland login pages, take a few minutes and set up the Domino Web Configuration database today.
About this Series
This series of articles on intranet solutions with IBM Lotus Notes/Domino and it's companion products is intended to help readers understand the fundamental methodology and capabilities of the product and how to utilize it to deliver a feature-rich, secure, and functional corporate intranet solution. It will include implementation strategies, case studies, industry-tested tips and tricks, and, with your input, true value to the administrator or developer who wants to utilize IBM Lotus technologies to deliver winning intranet solutions.
If you have any questions on the series, Lotus Notes/Domino, or if there's something you'd like to see addressed, visit the Intranet Journal Discussion Forum.
About the Author
John Roling is the Senior Groupware Administrator for a North American trade-show exhibit company and a certified Lotus Notes Administrator, Developer and all-around geek. You can keep up with him at his blog or drop him an e-mail at jroling@gmail.com.
Intranet Journal's Tutorials |
|
Managing Editor |