In the Makefile, set the following variables:
BASE: Enter the path to the directory where Access manager is installed.
JAVA_HOME: Enter the path to the directory where Java compiler is installed
CONFIG: Enter the entry specified in the login configuration file. This entry will be used to do the user authentication
Copy AMConfig.properties from Access Manager server installation machine location <CONFIG_DIR> to the client machine where the sample will be run.
On the client machine, be sure the following are in your classpath:
am_services.jar
jaas.jar
jss3.jar
AMConfig.properties
Include jaas.jar in your classpath if you are using a JDK version less than JDK1.4
A sample configuration file purejaassample.config is provided for testing this sample.
The file contains only one entry named Sample. Sample is the name to be entered for CONFIG in the Makefile:
Sample { PureJAASSampleLoginModule required ORG_NAME="dc=iplanet,dc=com" INDEX_NAME="LDAP" debug=true; }; |
The entry specifies that the LoginModule to be used to do the user authentication is the PureJAASSampleLoginModule and that this SampleLoginModule must succeed in order for authentication to be considered successful. It passes options with ORG_NAME as the organization name and INDEX_NAME as the Access Manager authentication module to which this sample must authenticate.
If you must use a different login configuration, modify the Makefile. For example, change the following:
-Djava.security.auth.login.config=purejaassample.config
to this:
-Djava.security.auth.login.config=your_jaas_config_file.config
To compile, run the gmake command.
To run the sample program run the gmake run command.