The RUIHandler sterotypes that are used in this sample are in the LdapRuiSample EGL Rich UI project. The web services are in the LdapRuiServices EGL web project. You can customize and reuse the functions in the ldapServices/LdapServices service in your Rich UI application. See the following table for descriptions of those functions.
| Function | Description |
|---|---|
| getInitialContext | This function attempts to bind to the LDAP-compliant server by using the user ID and password. If it binds to the server, getInitialContext returns a context object to use for additional data retrieval. |
| authenticate | This function calls getInitialContext to bind to the server. If getInitialContext binds ot the server, authenticate returns true. Otherwise, it returns false. |
| getUserData | This function calls getInitialContext to bind to the server. If the getInitialContext binds to the server, getUserData uses the context object to retrieve additional user data. It returns the information in a userData record. |
The EGL with LDAP Support project feature adds the LDAPExternalTypes.egl and LDAPLib.egl files to your project; these files access an LDAP-compliant server. To add LDAP support to a new EGL project whose code will access an LDAP-compliant server, in the New EGL Project wizard, click Show Advanced Settings; then click EGL with LDAP Support project. To add this EGL project feature to an existing project, add it from the Properties page of the project.