## Thought it looks better without the breadcrumbs bar, and kinda redunant since we have the sidebar nav
Origen v2
:

Table Of Contents

Contents

_origen.utility.ldap

Functions

_origen.utility.ldap.ldaps()

Classes

  • LDAPs: Dict-like container to retrieve defined LDAP instances.

  • LDAP: A single LDAP instance

class _origen.utility.ldap.LDAPs

Dict-like container to retrieve defined LDAP instances.

get()
items()
keys()
values()
class _origen.utility.ldap.LDAP

A single LDAP instance

auth

Retrieves this LDAP’s authentication configuration

base

Retrieves the base DNs

bind(self) → bool

Attempts to bind using its current Auth settings.

Returns

True if the bind was successful. Raises an error otherwise. Note this method will never return False.

Return type

bool

bind_as()
bound

Indicates whether this LDAP is currently bound. Returns true only if previously bound and the bind attempt was successful

name

Retrieves this LDAP’s name. Does not actually influence anything in the connection itself

search(filter: str, attrs: list) → dict

Runs a search with the given filters and attribute list. Returns a nested dict where the first level are the returned DNs. Each DN is a tuple with exactly two items in this order: (returned data, binary returned data). Whether or not your query returns data, binary data, or both is dependent on the server configuration and query itself.

Parameters
  • filter (str) – Search criteria formatted as an filters

  • attrs (list) – List of attributes to retrieve from matching search criteria. An empty list returns all available attributes, equivalent to [“*”]

Returns

Nested dict where the first level is the returned DNs. Each DN is a tuple with exactly two items in this order: (returned data, binary returned data). Whether or not your query returns data, binary data, or both is dependent on the server configuration and query itself.

Return type

dict

See also

server

Retrieves the server this LDAP was instantiated with

Similar to :meth:search except that this removes the first dict layer when a single DN is expected.

Parameters
  • filter (str) – Search criteria formatted as an filters, expecting to yield at most one DN.

  • attrs (list) – List of attributes to retrieve from matching search criteria. An empty list returns all available attributes, equivalent to [“*”]

Returns

Two-item tuple, each item being a dict corresponding to (returned data, binary returned data) respectively.

Return type

tuple

unbind()
validate_credentials()