ldap-authentication 4.0.3 → 4.0.4
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.
- package/index.d.ts +17 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -20,7 +20,24 @@ declare module 'ldap-authentication' {
|
|
|
20
20
|
explicitBufferAttributes?: string[]
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export const AUTH_RESULT_FAILURE = 0
|
|
24
|
+
export const AUTH_RESULT_SUCCESS = 1
|
|
25
|
+
export const AUTH_RESULT_FAILURE_IDENTITY_NOT_FOUND = -1
|
|
26
|
+
export const AUTH_RESULT_FAILURE_IDENTITY_AMBIGUOUS = -2
|
|
27
|
+
export const AUTH_RESULT_FAILURE_CREDENTIAL_INVALID = -3
|
|
28
|
+
export const AUTH_RESULT_FAILURE_UNCATEGORIZED = -4
|
|
29
|
+
|
|
30
|
+
export class AuthenticationResult {
|
|
31
|
+
constructor(authCode: number, identity: string, user: any, messages: string[], client: any)
|
|
32
|
+
readonly code: number
|
|
33
|
+
readonly identity: string
|
|
34
|
+
readonly user: any
|
|
35
|
+
readonly messages: string[]
|
|
36
|
+
readonly client: any
|
|
37
|
+
}
|
|
38
|
+
|
|
23
39
|
export function authenticate(options: AuthenticationOptions): Promise<any>
|
|
40
|
+
export function authenticateResult(options: AuthenticationOptions): Promise<AuthenticationResult>
|
|
24
41
|
|
|
25
42
|
export class LdapAuthenticationError extends Error {
|
|
26
43
|
constructor(message: any)
|