ldap_sasl_bind_sA function (winldap.h)
The ldap_sasl_bind_s function is a synchronous function that authenticates a client to the LDAP server using SASL.
WINLDAPAPI INT LDAPAPI ldap_sasl_bind_sA( [in] LDAP *ExternalHandle, [in] const PSTR DistName, [in] const PSTR AuthMechanism, [in] const BERVAL *cred, [in] PLDAPControlA *ServerCtrls, [in] PLDAPControlA *ClientCtrls, [out] PBERVAL *ServerData );
The session handle.
The distinguished name of the entry used to bind.
Indicates the authentication method to use.
The 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. For more information, see Remarks.
A list of LDAP server controls.
A list of LDAP client controls.
Authentication data returned by the server in response to the bind request.
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. For more information, see Return Values.
The ldap_sasl_bind_s function binds to an LDAP server using the Simple Authentication and Security Layer (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 arbitrary credentials to the server, so the application must be ready to interpret the response sent back from the server.
The winldap.h header defines ldap_sasl_bind_s as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|