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_HOST = 'ldap.server.com'
LDAP_BASE_DN = 'DC=example,DC=com'
conn = Ldap(LDAP_HOST, LDAP_BASE_DN)
# 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
conn.get_attributes()
# To get specific attributes
conn.get_attributes(['mail', 'cn])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basicldap3-0.1.2.tar.gz.
File metadata
- Download URL: basicldap3-0.1.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.7.5 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebf533b1ec1a6149fc35709c584c8695d1d70b77b086d96dbbdb038e85abfb2d
|
|
| MD5 |
d8bb0325a2cea42b9ea83b70e1f80986
|
|
| BLAKE2b-256 |
0277c8b2b6caaed2fa161cd77ed3b0117332959eb20112c455bcbdecb0640cdc
|
File details
Details for the file basicldap3-0.1.2-py3-none-any.whl.
File metadata
- Download URL: basicldap3-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.7.5 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc846a2fbe9e19ab9d81869033f9e827016f59c77d3f52a4881aee1a66b5edd1
|
|
| MD5 |
888cff9aef5608568f3aa8140417b15d
|
|
| BLAKE2b-256 |
c36624aca6f3ee5895bc77d67833e4f4c589d0e8b5987d288c1e08c3f3cf0872
|