{"id":15295119,"url":"https://github.com/keaz/simple-ldap","last_synced_at":"2025-10-08T08:10:18.451Z","repository":{"id":169839387,"uuid":"645907643","full_name":"keaz/simple-ldap","owner":"keaz","description":"A easy to use Rust LDAP library with high-level capabilities","archived":false,"fork":false,"pushed_at":"2025-02-26T15:59:59.000Z","size":116,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T06:51:16.131Z","etag":null,"topics":["ldap","ldap-authentication","ldap-library","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-26T18:17:48.000Z","updated_at":"2025-02-26T15:59:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"7738f0d1-72ca-46f4-ba4e-5848636b7e0c","html_url":"https://github.com/keaz/simple-ldap","commit_stats":null,"previous_names":["keaz/simple-ldap"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keaz%2Fsimple-ldap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keaz%2Fsimple-ldap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keaz%2Fsimple-ldap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keaz%2Fsimple-ldap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keaz","download_url":"https://codeload.github.com/keaz/simple-ldap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741158,"owners_count":21154251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ldap","ldap-authentication","ldap-library","rust","rust-lang"],"created_at":"2024-09-30T17:08:42.053Z","updated_at":"2025-10-08T08:10:18.446Z","avatar_url":"https://github.com/keaz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple LDAP client library for Ldap3\n\nA ldap client library that wraps [ldap3](https://github.com/inejge/ldap3) to make it easy to use.\n\n![CI](https://github.com/keaz/simple-ldap/actions/workflows/publish.yml/badge.svg)\n[![codecov](https://codecov.io/gh/keaz/simple-ldap/branch/main/graph/badge.svg?token=WE8Z9IBZTS)](https://codecov.io/gh/keaz/simple-ldap)\n[![Crates.io](https://img.shields.io/crates/v/simple-ldap)](https://crates.io/crates/simple-ldap)\n[![Documentation](https://docs.rs/simple-ldap/badge.svg)](https://docs.rs/simple-ldap)\n\n## Usage\n\nAdding `simple_ldap` as a dependency to your project:\n\n```commandline\ncargo add simple-ldap\n```\n\nOther useful pieces you'll likely need:\n\n```commandline\ncargo add url serde --features serde/derive\n```\n\n### Example\n\nThere are plenty more examples in the [documentation](https://docs.rs/simple-ldap)!\n\n#### Search records\n\n```rust,no_run\nuse simple_ldap::{\n    LdapClient, LdapConfig, SimpleDN,\n    filter::EqFilter,\n    ldap3::Scope\n};\nuse url::Url;\nuse serde::Deserialize;\nuse serde_with::serde_as;\nuse serde_with::OneOrMany;\n\n// A type for deserializing the search result into.\n#[serde_as] // serde_with for multiple values\n#[derive(Debug, Deserialize)]\nstruct User {\n    pub dn: SimpleDN,\n    pub uid: String,\n    pub cn: String,\n    pub sn: String,\n    #[serde_as(as = \"OneOrMany\u003c_\u003e\")]\n    pub addresses: Vec\u003cString\u003e,\n}\n\n\n#[tokio::main]\nasync fn main(){\n    let ldap_config = LdapConfig {\n        bind_dn: String::from(\"cn=manager\"),\n        bind_password: String::from(\"password\"),\n        ldap_url: Url::parse(\"ldaps://localhost:1389/dc=example,dc=com\").unwrap(),\n        dn_attribute: None,\n        connection_settings: None\n    };\n    let mut client = LdapClient::new(ldap_config).await.unwrap();\n    let name_filter = EqFilter::from(\"cn\".to_string(), \"Sam\".to_string());\n    let user: User = client\n        .search(\n        \"ou=people,dc=example,dc=com\",\n        Scope::OneLevel,\n        \u0026name_filter,\n        vec![\"dn\", \"cn\", \"sn\", \"uid\",\"addresses\"],\n    ).await.unwrap();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeaz%2Fsimple-ldap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeaz%2Fsimple-ldap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeaz%2Fsimple-ldap/lists"}