Skip to main content

hug_authentication_ldap

PyPI version Build Status Coverage Status License Join the chat at https://gitter.im/timothycrosley/hug

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

Metadata

Release files for hug_authentication_ldap 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hug_authentication_ldap 1.0.3
File Size Uploaded Provenance
hug_authentication_ldap-1.0.3.tar.gz 4.0 kB Without provenance Details

Release files / hug_authentication_ldap-1.0.3.tar.gz

Download URL hug_authentication_ldap-1.0.3.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4bd96cc3b06580689f3c437d5c2a219c2fb51a1716213fb554f0fbdd9096baa7
BLAKE2b-256 checksum
How to use checksums
8e0f0d140b6fa7a198490c2c98521e0e818c2f300ccbca1cff1230251b85b510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hug_authentication_ldap 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page