UNPKG

ldap-authentication

Version:

A simple async nodejs library for LDAP user authentication

29 lines (25 loc) 722 B
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[] } export function authenticate(options: AuthenticationOptions): Promise<any> export class LdapAuthenticationError extends Error { constructor(message: any) name: string } }