Class Client

Description

this is a class to provide low level promise base interaction with ldap server

Hierarchy

  • Client

Constructors

Properties

client: Client
logger?: Logger

Methods

  • Performs an add operation against the LDAP server.

    Description

    Allows you to add an entry (which is just a plain JS object)

    Type Parameters

    • T = any

    Parameters

    • __namedParameters: AddFnInput<T>

    Returns Promise<boolean>

  • Returns

    a connected ldap client that is useful for use flexibility of ldap.js directly.

    Parameters

    • Optional input: BindFnInput

    Returns Promise<Client>

  • Performs a LDAP compare operation with the given attribute and value against the entry referenced by dn.

    Type Parameters

    • T = any

    Parameters

    • __namedParameters: CompareFnInput<T>

    Returns Promise<undefined | boolean>

  • bind to server if client is not already bound

    Returns Promise<Client>

  • Deletes an entry from the LDAP server.

    Parameters

    • __namedParameters: DelFnInput

    Returns Promise<boolean>

  • unbind the connection and don't allow it to connect again.

    Returns Promise<void>

  • Description

    Performs an extended operation against LDAP server.

    Example

    const {value} = await client.extendedOp('1.3.6.1.4.1.4203.1.11.3');
    console.log('whois: ' + value);

    Parameters

    • __namedParameters: ExtendedOpFnInput

    Returns Promise<{ res: any; value: string }>

  • connection status

    Returns boolean

  • Performs a LDAP modify operation against attributes of the existing LDAP entity. This API requires you to pass in a Change object.

    Type Parameters

    • T = any

    Parameters

    • __namedParameters: ModifyAttributeFnInput<T>

    Returns Promise<boolean>

  • Description

    Performs a LDAP modifyDN (rename) operation against an entry in the LDAP server. A couple points with this client API:

    • There is no ability to set "keep old dn." It's always going to flag the old dn to be purged.
    • The client code will automatically figure out if the request is a "new superior" request ("new superior" means move to a different part of the tree, as opposed to just renaming the leaf).

    Parameters

    • __namedParameters: ModifyDnFnInput

    Returns Promise<boolean>

  • Description

    raw search to provided full flexibility

    Type Parameters

    • T = any

    Parameters

    • __namedParameters: QueryFnInput<T>

    Returns Promise<SearchEntry[]>

  • Description

    raw search returns just attributes

    // TODO: add Generic type for return data

    Type Parameters

    • T = any

    Parameters

    • __namedParameters: QueryFnInput<T>

    Returns Promise<SearchEntryObject[]>

  • unbind connection

    Returns Promise<void>

Generated using TypeDoc