![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 106](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642106.webp)
Using SASL with an LDAP Client
106
Netscape Directory Server Plug-In Programmer’s Guide • December 2003
nsslapd-pluginType: preoperation
nsslapd-pluginEnabled: on
nsslapd-plugin-depends-on-type: database
nsslapd-pluginId: test-bind
Check this source file for an example of a pre-operation plug-in function that
handles authentication:
<server_root>/plugins/slapd/slapi/examples/testbind.c
Using SASL with an LDAP Client
If you intend to use SASL as the method for authenticating clients, you need to
enable your LDAP clients to use SASL.
In your client, call the
ldap_sasl_bind()
or
ldap_sasl_bind_s()
function to
request authentication using SASL. To parse credentials from an asynchronous
SASL bind operation, call
ldap_parse_sasl_bind_result()
. These functions are
part of the Netscape LDAP C SDK 3.0.
The syntax for these functions are listed below:
LDAP_API(int) LDAP_CALL ldap_sasl_bind( LDAP *ld, const char *dn,
const char *mechanism, struct berval *cred,
LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp
);
LDAP_API(int) LDAP_CALL ldap_sasl_bind_s( LDAP *ld, const char *dn,
const char *mechanism, struct berval *cred,
LDAPControl **serverctrls, LDAPControl **clientctrls,
struct berval **servercredp );
The parameters are described below:
•
ld
is the connection handle, which is a pointer to the LDAP structure
containing information about the connection to the LDAP server.
•
dn
is the distinguished name (DN) that your client is attempting to
authenticate as.
•
mechanism
is the name of the SASL mechanism that you want to use for
authentication (the mechanism that you register in the initialization function
for your server plug-in).
•
cred
is a pointer to the
berval
structure containing the credentials that you
want to use for authentication.
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Page 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Page 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...