Sun Java System Identity Server 2004Q2
Sample
 

Main Page

Authentication (LDAP module) Samples

LDAPLogin

The sample program demonstrate how to use Remote Client API. It will authenticate user by LDAP module.  It is very easy to modify this program to use other existing or customized Authentication module.

 

Solaris:
  1. To run the sample program on Solaris, you will need to modify/verify the following:
    In Makefile
    BASE where Identity server is installed
    JAVA_HOME where Java compiler is installed
    DOMAIN the domain you like to login into
  2. Copy AMConfig.properties from IS server installation machine location /etc/opt/SUNWam/config from the server machine to the client machine
  3. Keep am_services.jar, jaas.jar, jss3.jar, AMConfig.properties in your classpath on client machine. (Note: Include jaas.jar in your classpath if you are using JDK version less than JDK1.4)
  4. To compile, just issue gmake.
  5. To run the sample program, execute gmake run.

 

For SSL mode:
  1. Add this JVM property in the sample client program
    • -D "java.protocol.handler.pkgs=com.iplanet.services.comm"
  2. Edit the following property in AMConfig.properties file
    • com.iplanet.am.admin.cli.certdb.dir=<ISinstall-dir>/SUNWam/servers/alias
    • com.iplanet.am.admin.cli.certdb.prefix=https-machine1.red.iplanet.com-machine1-
    • com.iplanet.am.server.protocol to https
    • com.iplanet.am.server.port to the appropriate port on the server machine
    where machine1 is the host name of the server

 

Windows2000:
  1. To run the sample program on Windows2000, you will need to modify/verify the following:
    In make.bat
    BASE where Identity server is installed
    JAVA_HOME where Java compiler is installed
    DOMAIN the domain you like to login into
  2. Copy AMConfig.properties from IS server installation machine location /etc/opt/SUNWam/config from the server machine to the client machine
  3. Keep am_services.jar, jaas.jar, jss3.jar, AMConfig.properties in your classpath on client machine. (Note: Include jaas.jar in your classpath if you are using JDK version less than JDK1.4)
  4. To compile, just issue make.
  5. To run the sample program, execute make run.

 

For SSL mode:
  1. Add this JVM property in the sample client program
    • -D "java.protocol.handler.pkgs=com.iplanet.services.comm"
  2. Edit the following property in AMConfig.properties file
    • com.iplanet.am.admin.cli.certdb.dir=<ISinstall-dir>\SUN\IdentityServer6\Servers\alias
    • com.iplanet.am.admin.cli.certdb.prefix=https-machine1.red.iplanet.com-machine1-
    • com.iplanet.am.server.protocol to https
    • com.iplanet.am.server.port to the appropriate port on the server machine
    where 'machine1' is the host name of the server

 

For the details, please reference the Remote Client API Java Docs.