Closed c-antin closed 11 months ago
Try:
ldap.simple_bind("username@domain.local", &password)?.success()?;
The first ?
gives you the result of the protocol operation. An error there is usually a problem with I/O. A successful return is an LdapResult
structure, which you can turn into a Result
with success()
. Don't use it blindly, there are situations where a non-zero result code indicates a kind of success.
minimal reproducible example: