Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is a synchronous 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, PBERVAL* ServerData ); |
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 AuthMechanismargument passed.
- ServerCtrls
-
[in] List of LDAP server controls.
- ClientCtrls
-
[in] List of LDAP client controls.
- ServerData
-
[out] Authentication data returned by the server in response to the bind request.
Return Value
If this function succeeds, the return value is LDAP_SUCCESS.
If this function fails, it returns an error code. See the LDAP_RETCODEenumeration 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 AuthMechanismargument. This is passed as a string in the form of GSSAPI, GSS-SPNEGO, DIGEST-MD5and 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 |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |