Socket
Socket
Sign inDemoInstall

ldap-verifyuser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap-verifyuser

ldap-verifyuser is a node.js library based on ldapjs, that authenticates a user against a LDAP or AD without requiring an configured administrator account.


Version published
Maintainers
1
Created
Source

ldap-verifyuser

What is ldap-verifyuser?

ldap-verifyuser is a node.js library based on ldapjs, that authenticates a user against a LDAP or AD without requiring an configured administrator account (which is required by MANY other implementations). This is done, by using the userprovided credentials itself to bind against the LDAP and verify the account's status.

How does it work?

One possible implementation of this lib would be:

var lib = require('ldap-verifyuser');

var config = {
  server: 'ldap://<ip>',
  adrdn: 'MYCORP\\',
  adquery: 'dc=MYCORP,dc=LOCAL',
  debug: false,
  rawAdrdn: false
},
username = 'myacc',
password = 'mypass'

lib.verifyUser(config, username, password, function(err, data){
  if(err) {
    console.error('error', err);
  } else {
    console.log('valid?', data.valid);
    console.log('locked?', data.locked);
    console.log('raw data available?', data.raw ? true : false);
  }
  process.exit(data.status);
});

Set config.rawAdrdn to true to use the supplied adrdn without modifications/appending the username.

Installation

To install you need to:

  • Perform a npm install ldap-verifyuser
  • You're done!

(You will need >node.js< of course)

Here be dragons!

This is the first inital version and will have rough edges, so please keep that in mind. Thus: 'here be dragons!'.

Temporarily i use my hotfixed version of ldapjs to make it compatible with node 0.12.x. Whenever a new upstream version of the official ldapjs is available i will switch back to it.

Keywords

FAQs

Package last updated on 22 May 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc