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

ProcedureTo Run a Sample Program on the Remote Client Command Line

Before You Begin

You must install the Access Manager Client APIs before you can run a sample program on the remote client command line. For more information on using the Client APIs, see Chapter 1, Using the Client SDK.

When you run a single sign-on (SSO) program from the command line, your application is not running in a web container, but your application must have access to the cookies from the web container HTTP requests. Your application must extract the Access Manager cookie from the request, and then pass the string value of the cookie into the createSSOToken method. Because notifications are only supported in a web container, and because your application is not running in a web container, notifications are not supported in this sample.

  1. In the directory AccessManager-base/SUNWam/samples/sso, run the gmake command.

  2. Modify the script AccessManager-base/SUNWam/samples/sso/run to specify the sample program that you want to test.

    For example, to run, in the last line in the script, replace CommandLineSSO with SDKCommandLineSSO. The result looks like this:

    ${JAVA_EXEC} -Xbootclasspath ...SDKCommandLineSSO $@

  3. If you are using a JDK version lower than JDK1.4, add the following to the classpath:


  4. If SSL is enabled, in the script AccessManager-base/SUNWam/samples/sso/run , add the following VM argument when executing your Java code: