{"id":17749463,"url":"https://github.com/oresoftware/ldap-pool","last_synced_at":"2025-03-15T01:31:44.436Z","repository":{"id":95712502,"uuid":"94361984","full_name":"ORESoftware/ldap-pool","owner":"ORESoftware","description":"A simple NPM package for creating a pool of LDAP clients.","archived":false,"fork":false,"pushed_at":"2018-05-30T04:36:15.000Z","size":237,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-23T09:13:56.561Z","etag":null,"topics":["javascript","javascript-library","ldap","ldap-client","ldap-library","ldap-pool","ldapjs","nodejs","pool","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ORESoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2017-06-14T18:37:43.000Z","updated_at":"2019-06-10T07:02:17.000Z","dependencies_parsed_at":"2023-03-13T16:47:18.168Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/ldap-pool","commit_stats":{"total_commits":66,"total_committers":1,"mean_commits":66.0,"dds":0.0,"last_synced_commit":"a93ff556cb7d69e8d2eb29a30424c739ddd7bdee"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fldap-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fldap-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fldap-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fldap-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/ldap-pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243671216,"owners_count":20328584,"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":["javascript","javascript-library","ldap","ldap-client","ldap-library","ldap-pool","ldapjs","nodejs","pool","typescript","typescript-library"],"created_at":"2024-10-26T11:23:25.974Z","updated_at":"2025-03-15T01:31:44.028Z","avatar_url":"https://github.com/ORESoftware.png","language":"JavaScript","readme":"\n\n# LDAP Pool - a simple client pool for LDAP connections\n## This API is promise-based - so as to work well with async/await flow control.\n\n\n\n## Installation\n\n```bash\n$ npm install ldap-pool --save\n```\n\n## Usage\n\n```typescript\n\nimport {Pool, LDAPPool, LDAPPoolClient} from 'ldap-pool';\n\nlet pool = new Pool({});\nlet pool = Pool.create({});  // same as above\n\n// synchronous\nlet client = pool.getClientSync(); // returns a LDAPPoolClient synchronously\n\n// asynchronous\npool.getClient().then(function(c: LDAPPoolClient){\n   // gets an LDAPPoolClient asynchronously (the least active client)\n});\n\n```\n\nThe asynchronous getClient method is preferred, because this can guarantee we use a client that is\nnot already active. Although it shouldn't matter that much.\n\nHere we have a full use cycle:\n\n```typescript\n\nconst pool = Pool.create({\n  connOpts: {\n    url: url,\n    reconnect: true,\n    idleTimeout: 30000\n  },\n  size: 4,\n  dn: 'uid=cdt_main.gen,OU=Generics,O=cco.nabisco.com',\n  pwd: '\u003cpwd\u003e'\n})\n\n\nlet client = pool.getClientSync();\n\nclient.search('foo', {}, function(err,res){\n  \n  // when you're done, return the client to the pool\n  // this is important for performance, but *not* imperative for functionality/correctness\n  client.returnToPool();\n  \n});\n\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fldap-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fldap-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fldap-pool/lists"}