Skip to content

What is the correct way to change LDAPObject from SimpleLDAPObject? #205

@somay

Description

@somay

python-ldap version: 3.0.0
Python version: 3.5.2

The doc says ldap.initialize() uses ldap.ldapobject.LDAPObject and also says

Internally LDAPObject is set to SimpleLDAPObject by default.

It seems to me that by default implies that LDAPObject can be changes to ReconnectLDAPObject or custom class inheriting ldap.resiter.ResultProcessor or any other valid classes and then I call ldap.initialize() and successfully get a object of my registered class.
The way to change the default is not documented though.

I found that assigning a desired class to ldap.function.LDAPObject causes the aforementioned behaviour.
But this method seems tricky to me and I wonder it is your expected usage of this library.

It would be great if the things below is clarified in the doc.
Being obvious also through API design would be superb.

  • What is the recommended way to use classes other than SimpleLDAPObject?
  • Which is recommended whether calling ldap.initialize() or directly instantiating ldap.ldapobject.SimpleLDAPObject or such?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy