LDAP client library
A pure-Rust LDAP library using the Tokio stack.
The library can be used either synchronously or asynchronously. The aim is to offer essentially the same call interface for both flavors, with the necessary differences in interaction and return values according to the nature of I/O.
Usage
First, add this to your Cargo.toml
:
[]
= "0.4"
Next, add this to your crate root (src/lib.rs
or src/main.rs
):
extern crate ldap3;
Synchronous example
extern crate ldap3;
use ;
Asynchronous example
extern crate futures;
extern crate ldap3;
extern crate tokio_core;
use io;
use ;
use ;
use Core;
Status
All LDAP protocol operations are implemented, as well as the support for request and response controls. The driver still lacks automated handling of several common scenarios, such as referral chasing and paged results.
TLS support exists for the case of immediate negotiation (aka ldaps://). StartTLS will probably be supported in the medium term. On Unix-like systems, connecting through a Unix domain socket with the ldapi:// scheme is supported.
Caveats:
-
Certificate and hostname checking can't be turned off for TLS connections.
-
Unbind doesn't close our side of the connection, since the underlying TCP stream is inaccessible in the present implementation.
-
Abandon accepts only request ids of active searches.
-
Only version 3 of LDAP is supported.
-
CLDAP (LDAP over UDP) is not supported.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE), or
- MIT license (LICENSE-MIT)
at your option.