Sun logo      Previous      Contents      Index      Next     

Sun ONE Calendar Server 6.0 Programmer's Manual

Chapter 3
Proxy Authentication SDK Overview

This chapter describes the Calendar Server Proxy Authentication SDK (authSDK). It addresses the following topics:

Who Will Use the authSDK?

Programmers, whose installation has a portal service, can use authSDK to integrate the portal with Sun ONE Calendar Server. When a portal system authenticates a user, authSDK functions notify Sun ONE Calendar Server, which then allows the user access to various services without reauthentication.

What Is the authSDK?

The authSDK consists of a DLL/shared-object that exports five functions.

The install package includes the following, located in cal_svr_base/bin/authsdk:


The authSDK is pretty simple. It consists of initialization, lookup, and cleanup. Additionally, one other function, CEXP_SetHttpPort, allows the authSDK to use a non-standard port, and another, CEXP_GetVersion, gets the authSDK version number should you need to contact customer or technical support. For a complete description of the API functions, see Chapter 4, "Proxy Authentication SDK Reference."


Call CEXP_Init for initialization. If you pass it LDAP information, it initializes an LDAP connection used during the lookup phase for discovering on which calendar server the user resides. This connection is set up for a threaded environment. All threads share this connection, but since the locking is done in the LDAP, it is fast enough in most environments. The connection is kept open so there is no setup/teardown cost per lookup.

Other things set up by initialization include the programmer supplied attribute to use for matching the lookup user name in LDAP queries.


Use the lookup function, CEXP_GenerateLoginURL, when you want to generate a new session for a user. Lookup performs no authentication. It simply uses the user name and IP address to generate an entry in the session table for them and returns a URL associated with that session. If you pass the hostname of a calendar server, the function will contact that server to generate the session. If not, it will query the LDAP server to determine the host. In order for it to generate a session without actually authenticating the user, you must provide the proxy administrator’s ID and password.


If you are in a threaded environment and you wish to cleanup resources such as memory, open LDAP connections, etc., use CEXP_Shutdown.

Functions Overview

There are five functions in the SDK, as listed in Table 3-1.

Table 3-1  Proxy Authentication SDK Functions 




Generates a URL with the valid session ID.


Generates the version ID string.


Initializes the SDK.


Specify the port over which you will contact the calendar server.


Performs all shutdown procedures, including freeing memory and shutting down connections.

Previous      Contents      Index      Next     

Copyright 2003 Sun Microsystems, Inc. All rights reserved.