-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathindex.d.ts
More file actions
46 lines (41 loc) · 1.41 KB
/
index.d.ts
File metadata and controls
46 lines (41 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { ClientOptions } from 'ldapts'
declare module 'ldap-authentication' {
export interface AuthenticationOptions {
ldapOpts: ClientOptions
userDn?: string
adminDn?: string
adminPassword?: string
userSearchBase?: string
usernameAttribute?: string
username?: string
verifyUserExists?: boolean
starttls?: boolean
groupsSearchBase?: string
groupClass?: string
groupMemberAttribute?: string
groupMemberUserAttribute?: string
userPassword?: string
attributes?: string[]
explicitBufferAttributes?: string[]
}
export const AUTH_RESULT_FAILURE = 0
export const AUTH_RESULT_SUCCESS = 1
export const AUTH_RESULT_FAILURE_IDENTITY_NOT_FOUND = -1
export const AUTH_RESULT_FAILURE_IDENTITY_AMBIGUOUS = -2
export const AUTH_RESULT_FAILURE_CREDENTIAL_INVALID = -3
export const AUTH_RESULT_FAILURE_UNCATEGORIZED = -4
export class AuthenticationResult {
constructor(authCode: number, identity: string, user: any, messages: string[], client: any)
readonly code: number
readonly identity: string
readonly user: any
readonly messages: string[]
readonly client: any
}
export function authenticate(options: AuthenticationOptions): Promise<any>
export function authenticateResult(options: AuthenticationOptions): Promise<AuthenticationResult>
export class LdapAuthenticationError extends Error {
constructor(message: any)
name: string
}
}