You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flask-SimpleLDAP depends, and will install for you, recent versions of Flask
16
-
(0.12.4 or later) and [pyldap](https://github.com/pyldap/pyldap). Flask-SimpleLDAP is compatible
17
-
with and tested on Python 3.5, 3.6 and 3.7.
18
+
(0.12.4 or later) and [python-ldap](https://python-ldap.org/).
19
+
Please consult the [python-ldap installation instructions](https://www.python-ldap.org/en/latest/installing.html) if you get an error during installation.
18
20
19
-
Next, add a ``LDAP`` instance to your code and at least the three
20
-
required configuration options:
21
+
Next, add an ``LDAP`` instance to your code and at least the three
22
+
required configuration options. The complete sample from
23
+
[examples/basic_auth/app.py](examples/basic_auth/app.py) looks like this:
21
24
22
25
```python
23
-
from flask import Flask
26
+
from flask import Flask, g
24
27
from flask_simpleldap importLDAP
25
28
26
29
app = Flask(__name__)
30
+
#app.config['LDAP_HOST'] = 'ldap.example.org' # defaults to localhost
0 commit comments