Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ilb/node_ldap

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ilb/node_ldap - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

2

package.json
{
"name": "@ilb/node_ldap",
"version": "1.0.11",
"version": "1.0.12",
"description": "",

@@ -5,0 +5,0 @@ "author": "github@bystrobank.ru",

@@ -10,2 +10,9 @@ /**

}
/**
* check if this instance if configured
*/
isConfigured() {
return this.uri && this.uri.length > 0;
}
}

@@ -13,2 +13,3 @@ import { existsSync, readFileSync } from 'fs';

constructor(ldapConfPath = '/etc/openldap/ldap.conf') {
this.ldapConfig = null;
if (process.env.LDAP_URL) {

@@ -20,10 +21,3 @@ //configure using LDAP_URL variable if set

this.ldapConfig = new OpenLDAPConfig(readFileSync(ldapConfPath, 'utf8'));
} else {
throw new Error(
'Ldap client auto-configuration failed: LDAP_URL environment variable OR file ' +
ldapConfPath +
' required.'
);
}
this.ldapClientConfig = new LDAPClientConfig(this.ldapConfig);
this.ldapClientFactory = new LDAPClientFactory();

@@ -34,2 +28,8 @@ this.ldapClient = null;

/**
* check if ldapFactory configured
*/
isConfigured() {
return !!(this.ldapConfig && this.ldapConfig.isConfigured());
}
/**
* lazy-initalization method to get ldapClient

@@ -39,3 +39,4 @@ */

if (this.ldapClient === null) {
this.ldapClient = this.ldapClientFactory.getLDAPClient(this.ldapClientConfig);
const ldapClientConfig = new LDAPClientConfig(this.ldapConfig);
this.ldapClient = this.ldapClientFactory.getLDAPClient(ldapClientConfig);
}

@@ -42,0 +43,0 @@ return this.ldapClient;

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