Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Flask-BasicAuth-LDAP

Flask-BasicAuth-LDAP is a Flask extension that provides an easy way to protect certain views of an application with LDAP_ and HTTP basic access authentication_

.. _LDAP: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol .. _basic access authentication: https://en.wikipedia.org/wiki/Basic_access_authentication

Install

::

pip install flask-basicauth-ldap

Quickstart

::

from flask import Flask, jsonify
from flask_basicauth_ldap import LDAPBasicAuth

app = Flask(__name__)
auth = LDAPBasicAuth(app)

app.config['LDAP_HOST'] = 'ldap://test_host'
app.config['LDAP_PORT'] = 'test_port'
app.config['LDAP_DOMAIN'] = 'test_domain'


@app.route('/secret', methods=['GET'])
@auth.required
def secret_view():
   return jsonify({'status': 'secret'})

If you want to change a response on the unauthorized access, just use unauthorizedhandler to register function that should return Response object

::

@auth.unauthorizedhandler def custom_unathorized_view(): return jsonify({'message': 'Athorize first'}), 401

Metadata

Release files for Flask-BasicAuth-LDAP 0.0.0a1.dev2

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

Source distribution (sdist)

Source distribution for Flask-BasicAuth-LDAP 0.0.0a1.dev2
File Size Uploaded Provenance Actions
Flask-BasicAuth-LDAP-0.0.0a1.dev2.tar.gz 3.4 kB Without provenance Details for Flask-BasicAuth-LDAP-0.0.0a1.dev2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Flask-BasicAuth-LDAP 0.0.0a1.dev2
File Interpreter ABI Platform Actions
Flask_BasicAuth_LDAP-0.0.0a1.dev2-py3-none-any.whl Python 3 none any Details for Flask_BasicAuth_LDAP-0.0.0a1.dev2-py3-none-any.whl

Total release size: 6.4 kB

Release files / Flask-BasicAuth-LDAP-0.0.0a1.dev2.tar.gz

Download URL Flask-BasicAuth-LDAP-0.0.0a1.dev2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
def87b2e6356084551722e9fd0bf1d886e681c663352a0008c36e519d7d14dee
BLAKE2b-256 checksum
How to use checksums
dcce001c3c59a98dc82fc617d0c6edaff22ed773505ca0745f09b40166b1257c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

Release files / Flask_BasicAuth_LDAP-0.0.0a1.dev2-py3-none-any.whl

Download URL Flask_BasicAuth_LDAP-0.0.0a1.dev2-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa3f5b644d1a8743ab2791cef2bbd753c26480382f3b75e5f2c940319663640d
BLAKE2b-256 checksum
How to use checksums
198bd603b4881345daf4e720f7521605dbf0bf2e347c16ad4853c542c522b2f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

Security for Flask-BasicAuth-LDAP 0.0.0a1.dev2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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