Sun Java System Calendar Server 6 2005Q4 Developer's Guide

How to Use the authSDK

To implement authSDK in your installation, follow these steps:

  1. Link the authSDK to your code.

    To integrate the authSDK into your existing code, include the expapi.h header file in the calling code and link with the DLL or shared-object. On some platforms you might also be required to link with other system libraries the authSDK requires.

  2. Authenticate your user with your portal authentication program.

  3. Call Function: CEXP_Init.

    This function initializes the authSDK configuration information. This is necessary before any other authSDK function is called.

  4. Optionally, call Function: CEXP_SetHttpPort.

    By default, the authSDK contacts the standard HTTP port, 80. Use this function to tell the authSDK to contact a nonstandard port when connecting to generate a session.

    Caution – Caution –

    This function is not thread safe and sets a global value. If you want to use it in a threaded environment, you must lock around this call and the Function: CEXP_GenerateLoginURL call.

  5. Call Function: CEXP_GenerateLoginURL.

    This function generates a session handle for the user and client IP address. It returns a string, in a buffer you allocate, containing a login URL to be used when connecting to Calendar Server. The string is a kind of token providing proof of identity. It is given to the client in the form of a cookie, or URL, inside HTTP headers or JavaScript.TM The client then connects to Calendar Server, presenting the token as proof of identity.

  6. Optionally, call CEXP_Shutdown.

    Call this function to shutdown and cleanup any resources used by the authSDK. It is not necessary to call this function in some environments (a simple login, for example), but plug-ins using the API might want to reclaim resources and continue running.

Other Tips

The following is a list of other things that must be done to assure success in using the AuthSDK: