Skip to content

Commit 4aba5b2

Browse files
Updated changelog and docs (jazzband#375)
* Changelog uses new format of giving a link to the given PRs * Supersedes jazzband#310, jazzband#300, jazzband#292 Co-authored-by: Andrew-Chen-Wang <acwangpython@gmail.com>
1 parent ae1ea58 commit 4aba5b2

File tree

3 files changed

+62
-2
lines changed

3 files changed

+62
-2
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
## Latest
2+
3+
* Added Italian translations ([#342](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/342))
4+
* Fixed DRF app registry bug, specifically `django.core.exceptions.AppRegistryNotReady`
5+
([#331](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/331))
6+
* Fixed support for PyJWT>=2.0.0 ([#376](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/376))
7+
8+
## Version 4.6
9+
10+
* Added support for PyJWT>=2.0.0 ([#329](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/329))
11+
* Restored Python 3.7 support ([#332](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/332))
12+
* Added Indonesian translations ([#316](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/316))
13+
* Fixed Django 4.0 re_path deprecation ([#280](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/280))
14+
15+
## Version 4.5
16+
17+
* Added `AUTH_HEADER_NAME` to settings ([#309](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/309))
18+
* Added `USER_AUTHENTICATION_RULE` to settings ([#279](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/279))
19+
* Added `UPDATE_LAST_LOGIN` to settings ([#238](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/238))
20+
* Fixed packaging of locale folder for installation ([#117](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/117))
21+
* Allowed TokenUser to be configurable ([#172](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/172))
22+
* Dropped Python 3.7 and below (restored Python 3.7 but not 3.6 in next version)
23+
* Improved error message if cryptography isn't installed
24+
when developer tries to use a certain algorithm that needs the package
25+
([#285](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/285))
26+
* Fixed Django 4.0 ugettext_lazy deprecation warnings ([#186](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/186))
27+
* Remove upper bound of Python version ([#225](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/225))
28+
* Added DRF 3.11 support ([#230](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/230))
29+
30+
Translations:
31+
* Added French translations ([#314](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/314))
32+
* Added Spanish translations ([#294](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/294))
33+
* Added Argentinian Spanish translations ([#244](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/244))
34+
* Added Persian translations ([#220](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/220))
35+
* Added German translations ([#198](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/198))
36+
* Added Czech translations ([#188](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/188))
37+
* Added Polish translations ([#166](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/166))
38+
* Fixed incorrect language encoding from de_CH to es_CL ([#299](https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/299))
39+
140
## Version 4.4
241

342
* Added official support for Python 3.8 and Django 3.0.

docs/development_and_contributing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ directory:
1212
pip install --upgrade pip setuptools
1313
pip install -e .[dev]
1414
15+
If you're running a Mac and/or with zsh, you need to escape the brackets:
16+
17+
.. code-block:: bash
18+
19+
pip install -e .\[dev\]
20+
1521
To run the tests:
1622

1723
.. code-block:: bash

docs/settings.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Some of Simple JWT's behavior can be customized through settings variables in
3131
'AUTH_HEADER_NAME': 'HTTP_AUTHORIZATION',
3232
'USER_ID_FIELD': 'id',
3333
'USER_ID_CLAIM': 'user_id',
34+
'USER_AUTHENTICATION_RULE': 'rest_framework_simplejwt.authentication.default_user_authentication_rule',
3435
3536
'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',),
3637
'TOKEN_TYPE_CLAIM': 'token_type',
@@ -77,7 +78,7 @@ When set to ``True``, causes refresh tokens submitted to the
7778
``TokenRefreshView`` to be added to the blacklist if the blacklist app is in
7879
use and the ``ROTATE_REFRESH_TOKENS`` setting is set to ``True``.
7980
You need to add ``'rest_framework_simplejwt.token_blacklist',`` to your
80-
``INSTALLED_APPS`` in the settings file to use this settings.
81+
``INSTALLED_APPS`` in the settings file to use this setting.
8182

8283
Learn more about :doc:`/blacklist_app`.
8384

@@ -159,7 +160,12 @@ collection will be used to build the "WWW-Authenticate" header in the response.
159160
``AUTH_HEADER_NAME``
160161
----------------------------
161162

162-
The authorization header name to be used for authentication. The default is ``HTTP_AUTHORIZATION`` which will accept the ``Authorization`` header in the request. For example if you'd like to use ``X_Access_Token`` in the header of your requests please specify the ``AUTH_HEADER_NAME`` to be ``HTTP_X_ACCESS_TOKEN`` in your settings.
163+
The authorization header name to be used for authentication.
164+
The default is ``HTTP_AUTHORIZATION`` which will accept the
165+
``Authorization`` header in the request. For example if you'd
166+
like to use ``X_Access_Token`` in the header of your requests
167+
please specify the ``AUTH_HEADER_NAME`` to be
168+
``HTTP_X_ACCESS_TOKEN`` in your settings.
163169

164170
``USER_ID_FIELD``
165171
-----------------
@@ -180,6 +186,15 @@ The claim in generated tokens which will be used to store user identifiers.
180186
For example, a setting value of ``'user_id'`` would mean generated tokens
181187
include a "user_id" claim that contains the user's identifier.
182188

189+
``USER_AUTHENTICATION_RULE``
190+
----------------------------
191+
192+
Callable to determine if the user is permitted to authenticate. This rule
193+
is applied after a valid token is processed. The user object is passed
194+
to the callable as an argument. The default rule is to check that the ``is_active``
195+
flag is still ``True``. The callable must return a boolean, ``True`` if authorized,
196+
``False`` otherwise resulting in a 401 status code.
197+
183198
``AUTH_TOKEN_CLASSES``
184199
----------------------
185200

0 commit comments

Comments
 (0)