The following example explains how the Proxy Authentication can be used. Use this example as a reference point to decide how to use the SDK in your environment.
To test the Proxy Authentication API, see the cgiauth.c file. You need to edit certain #define statements appearing at the beginning of the file to suit your configuration:
#define HTML_SOURCE_FILE “login.html” #define BUFFER_SIZE 1024 #define MAIL_SERVER “mail.yourdomain.com” #define DIRECTORY_SERVER “directory.yourdomain.com” #define DN “o=yourdomain.com” #define ADMINNAME “admin” #define ADMINPASS “admin” |
Change the values for MAIL_SERVER, DIRECTORY_SERVER, DN, ADMINNAME, and ADMINPASS to reflect your configuration. For example, if the mail server is mail.siroe.com, the directory server is ldap.siroe.com, and the administration username and password are sysadmin, then those lines should appear as follows:
#define HTML_SOURCE_FILE “login.html” #define BUFFER_SIZE 1024 #define MAIL_SERVER “mail.siroe.com” #define DIRECTORY_SERVER “ldap.siroe.com” #define DN “o=siroe.com” #define ADMINNAME “sysadmin” #define ADMINPASS “sysadmin” |
Compile the cgiauth.c file into an executable CGI file and configure an HTTP server to execute the newly compiled CGI file.
If everything is set up correctly, upon running the script within a web browser, the CGI script presents the user with a simple Login screen based on the login.html file. If a user enters a valid username and password, the script launches a Messenger Express session without Messenger Express prompting the user to reauthenticate.