Skip to content

Commit 5ce5e7f

Browse files
authored
Release 3.0.0 Changlelog, version and minor version dependency updates. See also #1474 (#1485)
1 parent 72d0551 commit 5ce5e7f

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

CHANGELOG.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Security
1515
-->
1616

17-
## [unreleased]
17+
## [3.0.0] - 2024-09-05
18+
19+
### WARNING - POTENTIAL BREAKING CHANGES
20+
* Changes to the `AbstractAccessToken` model require doing a `manage.py migrate` after upgrading.
21+
* If you use swappable models you will need to make sure your custom models are also updated (usually `manage.py makemigrations`).
22+
* Old Django versions below 4.2 are no longer supported.
23+
* A few deprecations warned about in 2.4.0 (#1345) have been removed. See below.
24+
1825
### Added
19-
* Add migration to include `token_checksum` field in AbstractAccessToken model.
20-
* Added compatibility with `LoginRequiredMiddleware` introduced in Django 5.1
21-
* #1404 Add a new setting `REFRESH_TOKEN_REUSE_PROTECTION`
26+
* #1366 Add Docker containerized apps for testing IDP and RP.
27+
* #1454 Added compatibility with `LoginRequiredMiddleware` introduced in Django 5.1.
28+
2229
### Changed
23-
* Update token to TextField from CharField with 255 character limit and SHA-256 checksum in AbstractAccessToken model. Removing the 255 character limit enables supporting JWT tokens with additional claims
24-
* Update middleware, validators, and views to use token checksums instead of token for token retrieval and validation.
25-
* #1446 use generic models pk instead of id.
26-
* Transactions wrapping writes of the Tokens now rely on Django's database routers to determine the correct
30+
* Many documentation and project internals improvements.
31+
* #1446 Use generic models `pk` instead of `id`. This enables, for example, custom swapped models to have a different primary key field.
32+
* #1447 Update token to TextField from CharField. Removing the 255 character limit enables supporting JWT tokens with additional claims.
33+
This adds a SHA-256 `token_checksum` field that is used to validate tokens.
34+
* #1450 Transactions wrapping writes of the Tokens now rely on Django's database routers to determine the correct
2735
database to use instead of assuming that 'default' is the correct one.
28-
* Bump oauthlib version to 3.2.2 and above
29-
* Update the OAuth2Validator's invalidate_authorization_code method to return an InvalidGrantError if the associated grant does not exist.
36+
* #1455 Changed minimum supported Django version to >=4.2.
3037

31-
### Deprecated
3238
### Removed
3339
* #1425 Remove deprecated `RedirectURIValidator`, `WildcardSet` per #1345; `validate_logout_request` per #1274
34-
* Remove support for Django versions below 4.2
3540

3641
### Fixed
37-
* #1443 Query strings with invalid hex values now raise a SuspiciousOperation exception (in DRF extension) instead of raising a 500 ValueError: Invalid hex encoding in query string.
38-
* #1468 `ui_locales` request parameter triggers `AttributeError` under certain circumstances
42+
* #1444, #1476 Fix several 500 errors to instead raise appropriate errors.
43+
* #1469 Fix `ui_locales` request parameter triggers `AttributeError` under certain circumstances
44+
3945
### Security
46+
* #1452 Add a new setting [`REFRESH_TOKEN_REUSE_PROTECTION`](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#refresh-token-reuse-protection).
47+
In combination with [`ROTATE_REFRESH_TOKEN`](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#rotate-refresh-token),
48+
this prevents refresh tokens from being used more than once. See more at
49+
[OAuth 2.0 Security Best Current Practice](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-29#name-recommendations)
50+
* #1481 Bump oauthlib version required to 3.2.2 and above to address [CVE-2022-36087](https://github.com/advisories/GHSA-3pgj-pg6c-r5p7).
4051

4152
## [2.4.0] - 2024-05-13
4253

oauth2_provider/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.4.0"
1+
__version__ = "3.0.0"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"django >= 4.2",
3838
"requests >= 2.13.0",
3939
"oauthlib >= 3.2.2",
40-
"jwcrypto >= 0.8.0",
40+
"jwcrypto >= 1.5.0",
4141
]
4242

4343
[project.urls]

0 commit comments

Comments
 (0)