Main Page
Authentication User ID Generation SPI Sample : UserIDGeneratorSample
This file explains how to compile, deploy and configure
the Authentication User ID Generation SPI Sample.
PRODUCT_DIR setting on different Platforms:
Steps to compile the UserIDGeneratorSample Sample program on
Solaris Sparc/x86, Linux
Follow the steps given below to compile the sample found
under <PRODUCT_DIR>/samples/authentication/spi/genuid .
Set the following environment variables. These variables
will be used to run the gmake command. You can also set these variables in
the Makefile. This Makefile is in <PRODUCT_DIR>/samples/authentication/spi/genuid.
- JAVA_HOME
Set this variable to your installation of JDK. The JDK should
be version 1.3.1_06 or higher.
- CLASSPATH
Set this variable to refer to am_services.jar which can
be found in the <PRODUCT_DIR>/lib directory. (Note: Include jaas.jar
in your classpath if you are using JDK version less than JDK1.4)
- BASE_DIR
Set this variable to the directory where the Access Manager
is installed.
- BASE_CLASS_DIR
Set this variable to the directory where all the Sample
compiled classes are located.
- JAR_DIR
Set this variable to the directory where the JAR files of
the Sample compiled classes will be created.
Go to the <PRODUCT_DIR>/samples/authentication/spi/genuid
directory and run gmake.
Steps to "deploy" the UserIDGeneratorSample Sample program
- Copy UserIDGeneratorSample.jar
from JAR_DIR to <PRODUCT_DIR>/lib.
- Update classpath with UserIDGeneratorSample.jar in the Web
Container from which this sample has to run. For use with Sun ONE Webserver,
go to server instance's config directory /<WS-home-dir>/https-<WS-instance-name>/config/.
For Sun ONE App Server <AS-home-dir>/domain/domain1/server1/config/
and update server.xml with new classpath.for all other containers consult
their documentation.
- Restart web container (e.g. /<WS-home-dir>/https-<WS-instance-name>/start,
/<AS-home-dir>/domains/domain1/server1/bin/start for Web Server and
App server respectively)
Steps to configure UserIDGeneratorSample Sample program
The Authentication User ID Generation Sample can be
configured at the Organization level and used/invoked by out of box Membership/Self
registration auth module.
Configuring UserIDGeneratorSample Sample for Organization
:
- Log in to Access Manager console as amAdmin to http://<host>.<domain>:<port>/<Console-Deploy-URI>.
- Select the "Identity Management" tab view and select your organization.
- Select "Services" from the "View" menu.
- Click on "Core" in the navigation frame under "Authentication".
- Add "com.iplanet.am.samples.authentication.spi.genuid.UserIDGeneratorSample"
to "Pluggable User Name Generator Class" attribute
- Click on "Save" to save the changes.
- Log out.
Accessing authentication module for Organization
:
Note : This module is the one which invokes UserIDGenerator
SPI implementation class. Out of box, only Membership/Self registration
authentication module calls this SPI implementation.
- Make sure that you have registered, created template and enabled
Membership authentication module for your organization.
- Enter URL http://<host>.<domain>:<port>/<Service-Deploy-URI>/UI/Login?module=Membership(If
you choose to use an organization other than the default, please specify
that in the URL using the 'org' parameter.)
- Click on "New User" button and try to register any existing
user name/id.
- The UserIDGeneratorSample will get executed and you will be
presented with the generated User IDs choice menu to choose any one user
name/id.
On Windows2000
Steps to compile UserIDGeneratorSample Sample program on Windows2000
- Go to the <install-root>\samples\authentication\spi\genuid
directory and run make.
Steps to deploy the UserIDGeneratorSample Sample program
- Copy UserIDGeneratorSample.jar from JAR_DIR to <install-root>\lib
- Update classpath with UserIDGeneratorSample.jar in the Web
Container from which this sample has to run.
- Restart Access Manager ("<install-root>\bin\amserver
start").
Steps to configure UserIDGeneratorSample Sample program
Refer to this section in the "On Solaris" section in
this document.
|