Expresso Registration and LoginExpresso provides a sophisticated and customizable solution for registration of users into the Expresso framework and, therefore, the Expresso-based applications. This document explains the various features available with the Expresso registration system and details the procedures for customizing the features.
Expresso Components Listing |
||||||
IntroductionIn general, the process is thus. A user visits your site and finds one (or more) links to register on the site. Clicking on the registration link takes the user to a screen where they are prompted for the bare minimum information required for "express" registration . Once the user fills-in the form and registers, based on site properties, she is optionally taken to a screen for "detailed" registration . Once she completes all required entries, she is considered "fully" registered and can proceed to the login screen and actually login to the system. The functions described below are provided by two of Expresso's controllers. The login function, including express registration, are handled by the com.jcorporate.expresso.services.controller.LoginController class, mapped to the Struts "/Login" action. The extended registration functions are handled by the com.jcorporate.expresso.services.controller.Registration class, mapped to the Struts "/Register" action. To see the various states (Expresso) or forwards (Struts) that these two controllers define, and to find out which JSPs handle the presentation, see struts-config.xml. The login controller provides functions to register a user, validate
the newly registered user's email address, login/logout users, change the
user's password, and send email containing the user's password if the password
is lost opr forgotten. The registation controller provides a menu of the
types of registration information required from the user for extended registration.
It allows the user to add, update or, optionally, to delete the information.
|
|
||||||||||||||||
If you decide to write your own registration and login controllers, all
Expresso needs for it core functionality is : login-name, uid (integer)
and email-address, and that the user be put in a user-group. If you write
your own login controller, then even the password is optional since your
controller will provide the password checking/email-validation/change-password/etc.
functions on its own. Express RegistrationExpress registration deals with getting the bare minimum information required to identify and authenticate an user on the site. As such, it requires a "Login Name" and a password. In addition, to communicate with the user, an email address is required. The site has control over whether the user specifies the "Login Name" she prefers, or alternatively, if the email address is used also as the "Login Name". As detailed below, the site has also a choice in specifying whether the user specifies her password, or alternatively, if Expresso generates a random initial password for the user. In either case, the user has a choice to change the password after the registration process is complete. If extended registration is specified for a domain , then, upon completion of express registration the user is temporarily placed in a Expresso user group call "NotReg - Users Not Fully Registered Yet". The registration controller, when all extended information is provided, moves the user into the proper user group for the domain. When the user completes the registration the Admin is emailed an email that provides a link to access the registration information and approve or deny the registration. Email ValidationHow do you know that the email the user provided, in fact, really does belong to the user? The way Expresso does this is to send an email containing an authorization code to the email address provided by the user at registration. Once the user clicks on the link provided, Expresso will validate the user with the assumption that if the user is able to access email sent to that address, then the user owns that email address (it's your call whether this is a valid assumption or not). Once validated, in the securest form, only then is an email sent to the user containing her password. Of course, there are various levels of customization in the authentication process. The site can choose whether the user provides the password, or whether Expresso generates one for the user. The site can choose whether an authentication step, as detailed above, is used before the password is emailed to the user. Or, the site can choose simply to assume that the user provided a valid email address to begin with and to simply send the password to that email address. In all cases, the password is stored internally in Expresso in encrypted form and the cleartext is not only never displayed on the browser, it is simply not available. Registration DomainsDo you have requirements for different sorts of registration information based on the type of user? For instance, on your site, you might have a type of user that is simply interested in using the forums. For these users, maybe you decided that only express registration is sufficient (i.e. all you need is a login name, a password and an email address). The next step up maybe someone that will buy somethig, and so you need contact information in additon to express registration. Finally, you might want to have suppliers register on your site and you might have requirements for completely different types of registration information that they need to provide. Expresso provides a way to easily handle these situations without having to write a whole bunch of custom controllers. All you need is to provide different Registration Domains, one each for each type of user. Registration domains are implemented as a regular Expresso DBObject, in com.jcorporate.expresso.services.dbobj.RegistrationDomain . As such, you can use the DBMaint controller to manipulate the records in RegistrationDomain. In fact, a link to do that is already provided to you on the Expresso "Security" page. So, what are the various fields in a registration domain?
Registration Object Map And Detailed/Extended RegistrationIf a registration domain specifies extended registration, then the question arises as to which set of DBObjects are to be used for the user to provide registration information for? That's where the registration object map comes in. Again, it is another plain, vanilla Expresso DBObject, in com.jcorporate.expresso.services.dbobj.RegistrationObjectMap . As such, you can use the DBMaint controller to manipulate the records in RegistrationObjectMap. In fact, a link to do that is already provided to you on the Expresso "Security" page. A registration object map provides a one-to-many relationship between a RegistrationDomain to DBObjects. Put another way, for each domain defined in RegistrationDomain, one or more entries are provided for DBObjects in RegistrationObjectMap, each tied back to the RegistrationDomain by its DomainID. Note that the DBObjects are completely independent of the domain, i.e. a DBObject can be reused for as many different domains as needed. Here are the fields in RegistrationObjectMap:
Default domain and registration object mapExpresso comes pre-configured for a domain called "default". If no "regDomain=" parameter is supplied when the Login controller is invoked, or if "regDomain=default" is supplied, then the default domain is used for user registration. With this domain, the following behavior is seen:
The corresponding registration domain map entry has the following characteristics:
Extended domain and registration object mapExpresso also comes pre-configured for a domain called "extended". This domain is primarily intended as an example of how to deal with multiple registration databases. The extended domain also comes with some sample registration objects in the package com.jcorporate.expresso.ext.dbobj.regobj. These DBObjects are Person, Address, Phone, Contact. Please note that these classes are not meant to be of use to every site. These are example objects. The point is that Expresso does not care at all what registration objects are used, or even if any are used. It is upto the site to either use these sample objects or define new ones to suit local needs Worthy of note here, the sample DBObjects were created with the WebAppWriter app-generator, available at DataFundamentals.com. Having read this document, the best way to see how the extended domain is setup is to go to Expresso's Security page and to list the records in the Registration Domain and Registration Object Map records. To get a taste of how it all works, go to Expresso's Security page and using the "Users" link, modify a test-user's registration domain to "extended". Then login as the test-user and from the Login page click on "Update Registration". Customization of registrationThere are several ways Expresso's behavior in this regard can be customized:
ConclusionFor technical information about how to use registration, please refer to the Expresso Developers Guide (EDG) or the Javadocs. |
|
Home | Products | Services | Partners | Customers | About Us | Login | Forums | Contact Us |
Copyright © 2001-2002 Jcorporate Ltd. All rights reserved. Copyright Privacy
Last Modified: 07-Oct-02 6:38:35 PM