Browse Source

new ad ldap datasource with ldapts

pull/7620/head
Hervé de CHAVIGNY 4 years ago
parent
commit
b1b4a8e0b8
  1. 7
      packages/server/src/integrations/adldap.ts

7
packages/server/src/integrations/adldap.ts

@ -156,7 +156,7 @@ module AdLdapModule {
} else { } else {
console.log("Client ldap Non connecté") console.log("Client ldap Non connecté")
} }
var response; var response = null;
try { try {
await this.client.bind(this.config.bindDN, this.config.secret) await this.client.bind(this.config.bindDN, this.config.secret)
@ -164,14 +164,15 @@ module AdLdapModule {
scope: 'sub', scope: 'sub',
filter: (query.bucket=='')?'(&(objectCategory=person)(objectClass=user)(mail=*)(sAMAccountName=*))':`${query.bucket}`, filter: (query.bucket=='')?'(&(objectCategory=person)(objectClass=user)(mail=*)(sAMAccountName=*))':`${query.bucket}`,
}) })
response = searchEntries response = JSON.stringify(searchEntries)
console.log("Ldap users :",response)
} catch (ex) { } catch (ex) {
throw ex; throw ex;
} finally { } finally {
await this.client.unbind() await this.client.unbind()
} }
console.log("Ldap users :",response)
return response return response
}) })

Loading…
Cancel
Save