Skip to main content

Provides basic authentication using the ldap3 library

Project description

Basic LDAP3

Basic LDAP is a small package that uses the ldap3 library. It can be used to authenticate a user against an LDAP server and can check whether the users is in a specific group. In addition it is possible to get user attributes if the authentication is successful.

Basic example

Import basicldap and define the server

from basicldap import Ldap

LDAP_BASE_DN = 'DC=example,DC=com'


# Using SSL
ssl = {"port": 636, "use_ssl": True}
conn = Ldap(LDAP_HOST, LDAP_BASE_DN, ldap3_args=ssl)

Authenticate the user

conn.authenticate(user_name, password)

Get user attributes (requires successful authentication)

# To get all attributes

# To get specific attributes
conn.get_attributes(['mail', 'cn])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for basicldap3, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size basicldap3-0.1.2-py3-none-any.whl (2.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size basicldap3-0.1.2.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page