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

ldap-ts-client

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap-ts-client - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1-beta1

10

dist/index.d.ts
import ldap, { SearchOptions, Control, SearchEntryObject } from "ldapjs";
import type { Logger } from "pino";
import type { Logger } from "fast-node-logger";
export interface IClientConfig extends Omit<ldap.ClientOptions, "url" | "bindDN"> {
/**Password to connect to AD */
/** Password to connect to AD */
pass: string;
/**User to connect to AD */
/** User to connect to AD */
user: string;
/**Root of tree for search */
/** Root of tree for search */
baseDN: string;
/** Domain name with format: ldap://{domain.com} */
ldapServerUrl: string;
/**instance of pino logger */
/** instance of pino logger */
logger?: Logger;

@@ -14,0 +14,0 @@ }

@@ -27,6 +27,7 @@ "use strict";

return new Promise((resolve, reject) => {
this.client.bind(this.config.user, this.config.pass, (err) => {
this.client.bind(this.config.user, this.config.pass, (err, result) => {
if (err) {
reject(err);
}
console.log(`File: index.ts,`, `Line: 105 => `, this.client.connected);
resolve(this.client);

@@ -50,5 +51,5 @@ });

async connect() {
var _a;
var _a, _b;
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.trace("connect()");
if (this.client && this.client.connected) {
if ((_b = this.client) === null || _b === void 0 ? void 0 : _b.connected) {
return this.client;

@@ -55,0 +56,0 @@ }

{
"name": "ldap-ts-client",
"version": "0.9.0",
"version": "0.9.1-beta1",
"description": "Type-safe LDAP client written in typescript",

@@ -5,0 +5,0 @@ "repository": {

import ldap, { SearchOptions, Control, SearchEntryObject } from "ldapjs";
import type { Logger } from "pino";
import type { Logger } from "fast-node-logger";
import { search } from "./services/search";

@@ -7,11 +7,11 @@

extends Omit<ldap.ClientOptions, "url" | "bindDN"> {
/**Password to connect to AD */
/** Password to connect to AD */
pass: string;
/**User to connect to AD */
/** User to connect to AD */
user: string;
/**Root of tree for search */
/** Root of tree for search */
baseDN: string;
/** Domain name with format: ldap://{domain.com} */
ldapServerUrl: string;
/**instance of pino logger */
/** instance of pino logger */
logger?: Logger;

@@ -101,3 +101,3 @@ }

return new Promise((resolve, reject) => {
this.client.bind(this.config.user, this.config.pass, (err) => {
this.client.bind(this.config.user, this.config.pass, (err, result) => {
if (err) {

@@ -107,2 +107,4 @@ reject(err);

console.log(`File: index.ts,`, `Line: 105 => `, this.client.connected);
resolve(this.client);

@@ -129,3 +131,3 @@ });

this.logger?.trace("connect()");
if (this.client && this.client.connected) {
if (this.client?.connected) {
return this.client;

@@ -132,0 +134,0 @@ }

Sorry, the diff of this file is not supported yet

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