We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.6.7
linux
start local ldap server:
docker run --detach --rm --name openldap \ -p 1389:1389 \ --env LDAP_ADMIN_USERNAME=admin \ --env LDAP_ADMIN_PASSWORD=adminpassword \ --env LDAP_USERS=customuser \ --env LDAP_PASSWORDS=custompassword \ bitnami/openldap:latest
install ldap client
npm i ldap-authentication
test script:
const { authenticate } = require('ldap-authentication') async function auth(user, password) { // auth with admin let options = { ldapOpts: { url: 'ldap://localhost:1389', // tlsOptions: { rejectUnauthorized: false } }, adminDn: 'cn=admin,dc=example,dc=org', adminPassword: 'adminpassword', userPassword: password, userSearchBase: 'dc=example,dc=org', usernameAttribute: 'cn', username: user, attributes: ['dn', 'sn', 'cn', 'uid'] // starttls: false } let userInfo = await authenticate(options) console.log(userInfo) } auth('customuser', 'custompassword')
Expected result (what nodejs returns):
{ dn: 'cn=customuser,ou=users,dc=example,dc=org', cn: [ 'User1', 'customuser' ], sn: 'Bar1', uid: 'customuser' }
The text was updated successfully, but these errors were encountered:
removeAllListeners
this
Successfully merging a pull request may close this issue.
What version of Bun is running?
0.6.7
What platform is your computer?
linux
What steps can reproduce the bug?
start local ldap server:
install ldap client
test script:
What is the expected behavior?
Expected result (what nodejs returns):
What do you see instead?
Additional information
The text was updated successfully, but these errors were encountered: