{"repo":"alexferl/flask-simpleldap","free":true,"listed":false,"github":"https://github.com/alexferl/flask-simpleldap","clone":"git clone https://github.com/alexferl/flask-simpleldap.git","description":"LDAP authentication extension for the Flask web framework","language":"Python","stars":182,"topics":["flask","ldap-authentication","openldap","flask-simpleldap","flask-extension","python-ldap","pyldap","ldap-user","python"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Flask-SimpleLDAP Flask-SimpleLDAP provides LDAP authentication for Flask and is compatible with and tested on Python 3.10+. Quickstart First, install Flask-SimpleLDAP: Flask-SimpleLDAP depends, and will install for you, a recent version of Flask (2.3.3 or later) and python-ldap. Please consult the python-ldap installation instructions if you get an error during installation. Next, add an LDAP instance to your code and at least the three required configuration options. The complete sample from examples/basic auth/app.py looks like this: When the user visits the protected URL, the browser will prompt for the login and password via the built-in HTTP authentication window. Note that with the default value of LDAP USER OBJECT FILTER the login is expected to match the userPrincipalName attribute of the LDAP user, e.g. me@mydomain.com . Once you get the basic example working, check out the more complex ones: - examples/groups demonstrates using: - @ldap.login required for form/cookie-based auth, instead of basic HTTP authentication. - @ldap.group required() to restrict access to pages based on the user's LDAP groups. - examples/blueprints implements the same functionality, but uses Flask's application factories and blueprints. OpenLDAP Add the LDAP instance to your code and depending on your OpenLDAP configuration, add the following at least LDAP USER OBJECT FILTER and LDAP USER OBJECT FILTER . Configuration Setting Description ---------------------------------- --------------------","default_branch":null,"files":null,"tree":[],"storefront":"/r/alexferl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alexferl/flask-simpleldap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}