From 8b28da1e53b51412ff0432a76f4663e2e1c3da9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20de=20CHAVIGNY?= Date: Sun, 4 Sep 2022 12:37:36 -0400 Subject: [PATCH] new ad ldap datasource with ldapts --- packages/server/src/integrations/adldap.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/server/src/integrations/adldap.ts b/packages/server/src/integrations/adldap.ts index 79099ad3d..cb96d2b6d 100644 --- a/packages/server/src/integrations/adldap.ts +++ b/packages/server/src/integrations/adldap.ts @@ -97,16 +97,7 @@ module AdLdapModule { this.config = config - this.client = new Client({ - url: this.config.url, - timeout: 0, - connectTimeout: 0, - tlsOptions: { - minVersion: 'TLSv1.2', - }, - strictDN: true, - }) - console.log("Client crée :",this.client) + } @@ -150,6 +141,16 @@ module AdLdapModule { } async command(query: { bucket: string }) { return this.ldapContext(async () => { + this.client = new Client({ + url: this.config.url, + timeout: 0, + connectTimeout: 0, + tlsOptions: { + minVersion: 'TLSv1.2', + }, + strictDN: true, + }) + console.log("Client crée :",this.client) await this.client.bind(this.config.bindDN, this.config.secret); if (this.client.isConnected) { console.log("Client ldap connecté")