Sun Java System Access Manager 7 2005Q4 Developer's Guide

C Sample Code for Authentication

By default, the C Authentication sample checks the directory where Access Manager is installed for a properties file named At installation, the file does not exist. If the file does not exist, you must create an file, and add the appropriate properties.

Code Example 6-7 lists the properties that are needed by the C Authentication API. Some of these are defined in and some are not. Those that are not defined in can be added to the file so they do not have to be identified for each function call. For example,, which identifies the organization from which you want to authenticate, can be added to

C Header File. The C Authentication API header file, am_auth.h, can be found in AccessManager-base/SUNWam/agents/include. It contains the function prototypes for the function calls available in the C Authentication API.

Example 9–1 File


# the identity server naming service url
# the directory to use for logging
# the logging level, all:5 being the highest and all:3 being medium
# the directory containing the certificate and key databases
# the prefix of the cert7.db and key3.db files, if any
# the password to the key3.db file
# true to trust SSL certificates not in the client cert7.db
# the nick name of the client certificate in the cert7.db
# the identity server organization desired for authentication,dc=com