Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
LDAP client based on LDAPjs.
const { Client } = require('ldapts');
const url = 'ldap://ldap.forumsys.com:389';
const bindDN = 'cn=read-only-admin,dc=example,dc=com';
const password = 'password';
const client = new Client({
url,
});
let isAuthenticated;
try {
await client.bind(bindDN, password);
isAuthenticated = true;
} catch (ex) {
isAuthenticated = false;
} finally {
await client.unbind();
}
const { Client } = require('ldapts');
const url = 'ldaps://ldap.jumpcloud.com';
const bindDN = 'uid=tony.stark,ou=Users,o=5be4c382c583e54de6a3ff52,dc=jumpcloud,dc=com';
const password = 'MyRedSuitKeepsMeWarm';
const searchDN = 'ou=Users,o=5be4c382c583e54de6a3ff52,dc=jumpcloud,dc=com';
const client = new Client({
url,
tlsOptions: {
rejectUnauthorized: args.rejectUnauthorized,
},
});
try {
await client.bind(bindDN, password);
const {
searchEntries,
searchReferences,
} = await client.search(searchDN, {
scope: 'sub',
filter: '(mail=peter.parker@marvel.com)',
});
} catch (ex) {
throw ex;
} finally {
await client.unbind();
}
const { Client } = require('ldapts');
const url = 'ldap://127.0.0.1:1389';
const bindDN = 'uid=foo,dc=example,dc=com';
const password = 'bar';
const dnToDelete = 'uid=foobar,dc=example,dc=com';
const client = new Client({
url,
});
try {
await client.bind(bindDN, password);
await client.del(dnToDelete);
} catch (ex) {
if (ex typeof InvalidCredentialsError) {
// Handle authentication specifically
}
throw ex;
} finally {
await client.unbind();
}
1.5.1
Do not throw "Size limit exceeded" error if sizeLimit
is defined and the server responds with 4
(Size limit exceeded).
Note: It seems that items are returned even though the return status is 4
(Size limit exceeded).
I'm not really sure what to do in that case. At this time, I decided against throwing an error and instead just returning the results returned thus far. That approach works with JumpCloud and forumsys' ldap servers
FAQs
LDAP client
The npm package ldapts receives a total of 35,427 weekly downloads. As such, ldapts popularity was classified as popular.
We found that ldapts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.