ldap-authentication 2.3.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +5 -10
  2. package/index.js +7 -4
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,13 +1,8 @@
1
+ import { ClientOptions } from 'ldapjs'
2
+
1
3
  declare module 'ldap-authentication' {
2
- type LDAPOpts = {
3
- url: string
4
- tlsOptions?: {
5
- rejectUnauthorized: boolean
6
- }
7
- connectTimeout?: number
8
- }
9
- export type AuthenticationOptions = {
10
- ldapOpts: LDAPOpts
4
+ export interface AuthenticationOptions {
5
+ ldapOpts: ClientOptions
11
6
  userDn?: string
12
7
  adminDn?: string
13
8
  adminPassword?: string
@@ -15,7 +10,7 @@ declare module 'ldap-authentication' {
15
10
  usernameAttribute?: string
16
11
  username?: string
17
12
  verifyUserExists?: boolean
18
- starttls?: Boolean
13
+ starttls?: boolean
19
14
  groupsSearchBase?: string
20
15
  groupClass?: string
21
16
  groupMemberAttribute?: string
package/index.js CHANGED
@@ -89,7 +89,12 @@ async function _searchUser(
89
89
  user = entry.object
90
90
  })
91
91
  res.on('searchReference', function (referral) {
92
- console.log('referral: ' + referral.uris.join())
92
+ // TODO: we don't support reference yet
93
+ // If the server was able to locate the entry referred to by the baseObject
94
+ // but could not search one or more non-local entries,
95
+ // the server may return one or more SearchResultReference messages,
96
+ // each containing a reference to another set of servers for continuing the operation.
97
+ // referral.uris
93
98
  })
94
99
  res.on('error', function (err) {
95
100
  reject(err)
@@ -133,9 +138,7 @@ async function _searchUserGroups(
133
138
  res.on('searchEntry', function (entry) {
134
139
  groups.push(entry.object)
135
140
  })
136
- res.on('searchReference', function (referral) {
137
- console.log('referral: ' + referral.uris.join())
138
- })
141
+ res.on('searchReference', function (referral) {})
139
142
  res.on('error', function (err) {
140
143
  reject(err)
141
144
  ldapClient.unbind()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldap-authentication",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "A simple async nodejs library for LDAP user authentication",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -39,6 +39,6 @@
39
39
  "ldapjs": "^2.3.3"
40
40
  },
41
41
  "devDependencies": {
42
- "jasmine": "^4.3.0"
42
+ "jasmine": "^4.4.0"
43
43
  }
44
44
  }