Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit b599f56

Browse files
committed
update readme and changelog
1 parent f2fc842 commit b599f56

File tree

3 files changed

+56
-48
lines changed

3 files changed

+56
-48
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
0.7.1 (2018-03-16)
4+
0.7.1 (2018-04-07)
55
------------------
66

77
* Add setting FORCE_ATTRIBUTE_VALUE_AS_LIST

Pipfile.lock

Lines changed: 44 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ Your configuration should be declared within your Flask config. Sample configura
3939
LDAP_TLS_VERSION = ssl.PROTOCOL_TLSv1_2 # default: PROTOCOL_TLSv1
4040
LDAP_CERT_PATH = '/etc/openldap/certs'
4141
42-
TIf you want to allways get the entry attribute value as a list, instead of a string if only one item is in the attribute set:
42+
If you want to always get any entry attribute value as a list, instead of a string if only one item is in the attribute list, then set:
4343

4444
.. code-block:: python
4545
4646
FORCE_ATTRIBUTE_VALUE_AS_LIST = True
4747
48-
Create the ldap instance within your application:
48+
Default is ``False`` and will return a string if only one item is in the attribute list.
49+
50+
51+
Setup
52+
-----
53+
54+
Create the LDAP instance in your application.
4955

5056
.. code-block:: python
5157
@@ -159,7 +165,7 @@ Authenticate with Client
159165
160166
with app.app_context():
161167
retval = ldap.authenticate(username, password, attribute,
162-
basedn, search_filter')
168+
basedn, search_filter)
163169
if not retval:
164170
return 'Invalid credentials.'
165171
return 'Welcome %s.' % username
@@ -168,13 +174,14 @@ Authenticate with Client
168174
Bind as user
169175
------------
170176

171-
To bind as user for the current request save a new connection to ``flask.g.ldap_conn``:
177+
To bind as user for the current request instance a new connection from ``flask.g.ldap_conn``:
172178

173179
.. code-block:: python
174180
175181
g.ldap_conn = ldap.connect(userdn, password)
176182
user = User.query.get(userdn)
177183
184+
178185
Unit Test
179186
---------
180187

0 commit comments

Comments
 (0)