Sun Java System Access Manager 7.1 C API Reference

C Code Samples

Access Manager provides code samples that demonstrate how you can use the APIs to connect C applications to the Access Manager framework. By default, the code samples are installed in the /AccessManager-base/SUNWam/samples/csdk directory. The code samples are:

am_auth_test.c

Demonstrates the basic usage of the authentication APIs used to login to an instance of Access Manager.

am_log_test.c

Demonstrates the basic usage of the logging APIs used to write a message to the Access Manager logs.

am_policy_test.c

Demonstrates the basic usage of the policy APIs used to evaluate access for specified resources.


Note –

Before running the sample, be sure the password defined in the property com.sun.am.policy.am.password is in clear text as the sample does not decrypt it. Since am_policy_test.c is only a sample, this poses no security risk. For example:

com.sun.am.policy.am.username = UrlAccessAgent
com.sun.am.policy.am.password = clear-text-password

These properties are defined in AMAgent.properties.


am_sso_test.c

Demonstrates the basic usage of the SSO APIs to perform session operations.

apache_agent.c

Demonstrates how you can use the policy APIs to build a web agent for the Apache Web Server.


Caution – Caution –

This is a sample web agent and is not intended to serve as a web agent in a real deployment.


Makefile

Makefile for building the sample agent.

README.TXT

Provides detailed instructions for building and executing sample programs.