{"id":47444095,"url":"https://github.com/felipenoris/LDAPClient.jl","last_synced_at":"2026-04-06T13:00:57.450Z","repository":{"id":61798488,"uuid":"286600595","full_name":"felipenoris/LDAPClient.jl","owner":"felipenoris","description":"Julia client for LDAP","archived":false,"fork":false,"pushed_at":"2024-10-22T14:15:50.000Z","size":18,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-31T06:33:53.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipenoris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2020-08-10T23:39:24.000Z","updated_at":"2025-08-20T07:44:11.000Z","dependencies_parsed_at":"2025-06-11T20:32:42.119Z","dependency_job_id":"9a130303-5cd4-40b9-a258-0abdc635d9f8","html_url":"https://github.com/felipenoris/LDAPClient.jl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/felipenoris/LDAPClient.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipenoris%2FLDAPClient.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipenoris%2FLDAPClient.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipenoris%2FLDAPClient.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipenoris%2FLDAPClient.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipenoris","download_url":"https://codeload.github.com/felipenoris/LDAPClient.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipenoris%2FLDAPClient.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31473271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-03-23T06:00:59.902Z","updated_at":"2026-04-06T13:00:57.441Z","avatar_url":"https://github.com/felipenoris.png","language":"Julia","funding_links":[],"categories":["Network Security"],"sub_categories":["Protocol Libraries"],"readme":"\n# LDAPClient.jl\n\n[![License][license-img]](LICENSE)\n[![travis][travis-img]][travis-url]\n[![appveyor][appveyor-img]][appveyor-url]\n[![codecov][codecov-img]][codecov-url]\n\n[license-img]: http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[travis-img]: https://img.shields.io/travis/felipenoris/LDAPClient.jl/master.svg?logo=travis\u0026label=Linux+/+macOS\u0026style=flat-square\n[travis-url]: https://travis-ci.org/felipenoris/LDAPClient.jl\n[appveyor-img]: https://img.shields.io/appveyor/ci/felipenoris/ldapclient-jl/master.svg?logo=appveyor\u0026label=Windows\u0026style=flat-square\n[appveyor-url]: https://ci.appveyor.com/project/felipenoris/ldapclient-jl/branch/master\n[codecov-img]: https://img.shields.io/codecov/c/github/felipenoris/LDAPClient.jl/master.svg?label=codecov\u0026style=flat-square\n[codecov-url]: http://codecov.io/github/felipenoris/LDAPClient.jl?branch=master\n\nA Julia client for LDAP (Lightweight Directory Access Protocol) based on [OpenLDAP](https://www.openldap.org/) library.\n\n## Installation\n\n```julia\npkg\u003e add LDAPClient\n```\n\n## Tutorial\n\n### Authentication\n\nThis implements the use-case of checking if a username and password are valid or not.\n`r` will be either an `AuthOk` for successful authentication, or `AuthErr` when the\npassword is wrong or any other error happened.\n\n```julia\nr = LDAPClient.authenticate(\"ldap://ldap.server.net\", \"my-username\", \"my-password\")\n```\n\n### Bind and Unbind\n\nUsually the user needs to bind to a LDAP connection before running queries.\nThe following example shows how to create a connection, bind to it, and unbind when you're finished with it.\n\n```julia\nconn = LDAPClient.LDAPConnection(\"ldap://ldap.server.net\") # this will not connect to the server yet\nLDAPClient.simple_bind(conn, \"my-username\", \"my-password\") # here we actually get to connect to the server\n# do stuff\nLDAPClient.unbind(conn)\n```\n\n### Anonymous and unauthenticated modes\n\nTo bind in unauthenticated mode, leave out the password from the `simple_bind` call:\n\n```julia\nLDAPClient.simple_bind(conn, \"my-username\")\n```\n\nTo bind in anonymous mode, leave out both username and password:\n\n```julia\nLDAPClient.simple_bind(conn)\n```\n\n### Running queries\n\nUse `LDAPClient.search` to perform queries on your LDAP server.\n\n```julia\nsearch(ldap::LDAPConnection, base::AbstractString, scope::LDAPScope;\n        filter::Union{Nothing, AbstractString}=nothing,\n        attr_desc_only::Bool=false,\n        size_limit::Integer=-1) :: MessageChain\n```\n\n`scope` can be one of these values: `LDAP_SCOPE_BASE`, `LDAP_SCOPE_ONELEVEL`, `LDAP_SCOPE_SUBTREE`, `LDAP_SCOPE_CHILDREN`.\n\nThe following example queries for users, filtering only results that match users named `USER1` or `USER2`.\n\n```julia\nsearch_string = \"CN=Users,DC=server,DC=net\" # will query Users on domain server.net\nscope = LDAPClient.LDAP_SCOPE_ONELEVEL\nchain = LDAPClient.search(conn, search_string, scope, filter=\"(|(name=USER1)(name=USER2))\")\n```\n\nThe `chain` output is a collection of messages.\nEach message can be an `Entry`, a `Reference` or a `Result`.\n\nWe can count how many messages of each kind we have with `count_messages(chain)`, `count_entries(chain)` or `count_references(chain)`.\n\nWe can iterate messages of each kind with `each_message(chain)`, `each_entry(chain)`, `each_reference(chain)`.\n\nFor `Entry` messages, we can inspect its attributes. The following shows a complete example.\n\n```julia\nconn = LDAPClient.LDAPConnection(\"ldap://ldap.server.net\")\nLDAPClient.simple_bind(conn, \"my-username\", \"my-password\")\n\nsearch_string = \"CN=Users,DC=server,DC=net\" # will query Users on domain server.net\nscope = LDAPClient.LDAP_SCOPE_ONELEVEL\nchain = LDAPClient.search(conn, search_string, scope, filter=\"(|(name=USER1)(name=USER2))\")\n\nfor entry in LDAPClient.each_entry(chain)\n    println(\"Reading attributes from user $(entry[\"name\"])\")\n    for attr in LDAPClient.each_attribute(entry)\n        println(attr)\n    end\nend\n\nLDAPClient.unbind(conn)\n```\n\nThis example outputs something like this.\n\n```\nReading attributes from user [\"USER1\"]\nLDAPClient.Attribute(\"objectClass\", [\"top\", \"person\", \"organizationalPerson\", \"user\"])\nLDAPClient.Attribute(\"cn\", [\"USER1\"])\nLDAPClient.Attribute(\"title\", [\"Manager\"])\n```\n\n## References\n\n* [LDAP.com](https://ldap.com/)\n\n* [OpenLDAP](https://www.openldap.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipenoris%2FLDAPClient.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipenoris%2FLDAPClient.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipenoris%2FLDAPClient.jl/lists"}