#include <ldap.h>
int ldap_sasl_bind_s(
LDAP *ld,
char *dn,
char *mechanism,
struct berval *cred,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
struct berval **servercredp)
|
The ldap_sasl_bind_s() function is used to authenticate a distinguished name (DN) to a directory server using Simple Authentication Security Layer (SASL).
After a connection is made to an LDAP server an LDAP bind API must be called before any other LDAP APIs can be called for that connection.
ldap_sasl_bind_s() is a synchronous request.
With this implementation, the primary reason for using the SASL bind facility is to use the client authentication mechanism provided by SSL to strongly authenticate to the directory server, using the client's X.509 certificate. For example, the client application can use the following logic:
A server that supports this mechanism (such as the DSSeries X.500 Directory Server), can then access the directory using the strongly authenticated client identity (as extracted from the client's X.509 certificate).
By setting mechanism to a NULL pointer, the SASL bind request will be interpreted as a request for simple authentication (i.e. equivalent to using ldap_simple_bind() or ldap_simple_bind_s()).
No OS/400 authority is required. All authority checking is done by the LDAP server.
If ldap_sasl_bind_s() is not successful, an error code will be returned. See LDAP Client API Error Conditions for possible LDAP error code values.
The following message may be set from this function.
CPF3CF2 E Error(s) occurred during running of ldap_sasl_bind_s API.
ldap_sasl_bind() -- Asynchronously bind to the directory using the Simple Authentication Security Layer (SASL).
ldap_simple_bind() -- Asynchronously bind to the directory using simple authentication.
ldap_simple_bind_s() -- Synchronously bind to the directory using simple authentication.
ldap_unbind() -- Asynchronously unbind from the
LDAP server and close the connection.
ldap_unbind_s() -- Synchronously unbind from the
LDAP server and close the connection.
ldap_set_rebind_proc() -- Sets the entry-point of a routine that will be called back to obtain bind credentials when contacting a new LDAP server during the chasing of referrals.
ldap_bind () -- Asynchronously bind to the directory (deprecated).
ldap_bind_s () -- Synchronously bind to the directory (deprecated).
|
Top
| LDAP APIs List APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |