If you incorporate ATG Self Service into your existing Web application, you can configure it so that users only have to log in once.

If your Web site has its own authentication mechanism, there are basically three parts to integrating ATG Self Service into a single sign-on scheme.

First, you must integrate the ATG UserProfileRepository with your user profile data. You can do this by mapping the repository description of ATG UserProfileRepository onto your user profile database tables.

The second part is to implement single sign-on in ATG Self Service. This should be done by creating a servlet that tests if a user is signed on and placing it in the SelfService.SelfService servlet chain.

If the user is not signed on, he is redirected to the appropriate login page. If a user is signed on, then the following code is executed in the servlet to log the user into ATG Self Service:

import atg.servlet.ServletUtil;
import atg.userprofiling.Profile;
import atg.userprofiling.IdentityManager;

IdentityManager getIdentityManager()
{
   return (IdentityManager)ServletUtil.getCurrentRequest().resolveName
   (getUserLoginManager().getIdentityManagerPath());
}

UserLoginManager getUserLoginManager()
{
   return (UserLoginManager)ServletUtil.getCurrentRequest().resolveName
   ("/atg/dynamo/security/UserLoginManager");
}

Profile profile = (Profile)ServletUtil.getCurrentRequest().resolveName
   ("/atg/userprofiling/Profile");
profile.getProfileTools().locateUserFromLogin(<username>, profile);
profile.getProfileTools().assumeSecurityIdentity(profile,
getIdentityManager());
 
loading table of contents...