ldap_sasl_bind (Compact 2013)

3/26/2014

This function is an asynchronous function that authenticates a client to the LDAP server using the Simple Authentication and Security Layer (SASL).

Syntax

ULONG ldap_sasl_bind_s(
  LDAP* ExternalHandle,
  const UNICODE PTCHAR DistName,
  const UNICODE PTCHAR AuthMechanism,
  const BERVAL* cred,
  LDAPControlA** ServerCtrls,
  LDAPControlA** ClientCtrls,
  int* MessageNumber
);

Parameters

  • ExternalHandle
    [in] Session handle.
  • DistName
    [in] Distinguished name of the entry used to bind.
  • AuthMechanism
    [in] Indicates the authentication method to use.
  • cred
    [in] Credentials to use for authentication. Arbitrary credentials can be passed using this parameter. The format and content of the credentials depend on the value of the AuthMechanism argument passed.
  • ServerCtrls
    [in] List of LDAP server controls.
  • ClientCtrls
    [in] List of LDAP client controls.
  • MessageNumber
    [out] The message identifier for the bind operation.

Return Value

If this function succeeds, the return value is LDAP_SUCCESS.

If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.

Remarks

This function binds to an LDAP server using the SASL protocol. The bind operation identifies a client to the directory server by providing a distinguished name and some type of authentication credentials. The authentication method being used determines the particular type of credential and is specified by the AuthMechanism argument. This is passed as a string in the form of GSSAPI, GSS-SPNEGO, DIGEST-MD5, and so on. This function can be used to pass any arbitrary credentials to the server, so the application must be ready to interpret the response sent back from the server.

Requirements

Header

winldap.h

Library

wldap32.lib

See Also

Reference

LDAP Session Functions
LDAP_RETCODE
ldap_sasl_bind_s
ldap_bind_s
ldap_bind
ldap_simple_bind_s
ldap_simple_bind