ldap3 0.12.1

Pure-Rust LDAP Client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Demonstrates synchronously connecting, binding to,
// and disconnectiong from the server.

use ldap3::LdapConn;
use ldap3::result::Result;

fn main() -> Result<()> {
    let mut ldap = LdapConn::new("ldap://localhost:2389")?;
    let _res = ldap
        .simple_bind("cn=Manager,dc=example,dc=org", "secret")?
        .success()?;
    Ok(ldap.unbind()?)
}