LDAP based authentication support for hug
Project description
hug_authentication_ldap
Easy to use LDAP based authentication support for hug:
import hug
import hug_authentication_ldap
authentication = hug_authentication_ldap.basic('myldap.server.net', 'uid={user_name},ou=people')
@hug.get(requires=authentication)
def say_hello(hug_user):
return 'Hello {}!'.format(hug_user.name)
Or, for general reusable LDAP password verification within hug:
import hug
import hug_authentication_ldap
ldap_check = hug_authentication_ldap.verify('myldap.server.net', 'uid={user_name},ou=people')
@hug.get()
def check(user_name, password):
if ldap_check(user_name, password):
return True
return False
Installing hug_authentication_ldap
Installing hug_authentication_ldap is as simple as:
pip3 install hug_authentication_ldap --upgrade
Ideally, within a virtual environment.
What is hug_authentication_ldap?
An extension for hug that provides LDAP based authentication support
Thanks and I hope you find hug_authentication_ldap helpful!
~Timothy Crosley
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file hug_authentication_ldap-1.0.3.tar.gz
.
File metadata
- Download URL: hug_authentication_ldap-1.0.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bd96cc3b06580689f3c437d5c2a219c2fb51a1716213fb554f0fbdd9096baa7 |
|
MD5 | 20620185b4434c9514febc42682e981b |
|
BLAKE2b-256 | 8e0f0d140b6fa7a198490c2c98521e0e818c2f300ccbca1cff1230251b85b510 |