The following functions are used to generate a session handle for a specific user and client IP address:
int EXP_GenerateLoginURL( char *pszUser, char *pszClientAddress, char *pszMailHost, char *pszURL); |
SDK Code Variables |
Description |
---|---|
pszUser |
A null-terminated string containing the user ID (uid). |
pszClientAddress |
The string representation of the client’s IP address. |
pszMailHost |
A null-terminated string containing the hostname or IP address of the user’s mail server. If the third parameter is NULL, the LDAP server (from EXP_init()) is searched to determine this host. Otherwise, the mail host specified is used. |
pszURL |
The buffer allocated by the caller function in which URL is returned. The URL can have a maximum of 2048 characters long (including terminating NULL). |
The function returns 0 on successful initialization, or a non-zero number on failure of initialization. On failure, errno is once again set to the most appropriate value.
The string returned by these functions is a login URL to be used when connecting to Messenger Express. Authentication applications (such as a login CGI) should call these functions after successfully authenticating the user based on the local authentication criteria. A typical CGI would use the resulting string to launch a URL or set a cookie on the client through HTTP headers or JavaScript.