Skip to content

Commit 0fec50f

Browse files
committed
Merge branch 'master' of https://github.com/Tuhin-thinks/django-oauth-toolkit into bug/1496/unhandled-empty-bearer-token-exception
- resolved conflicts at AUTHORS
2 parents d7ff603 + 01dfd06 commit 0fec50f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+11311
-1566
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ Fixes #
1414
- [ ] documentation updated
1515
- [ ] `CHANGELOG.md` updated (only for user relevant changes)
1616
- [ ] author name in `AUTHORS`
17+
- [ ] tests/app/idp updated to demonstrate new features
18+
- [ ] tests/app/rp updated to demonstrate new features

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
if: github.repository == 'jazzband/django-oauth-toolkit'
10+
if: github.repository == 'django-oauth/django-oauth-toolkit'
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -29,10 +29,9 @@ jobs:
2929
python -m build
3030
twine check dist/*
3131
32-
- name: Upload packages to Jazzband
32+
- name: Upload packages to PyPI
3333
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
34-
uses: pypa/gh-action-pypi-publish@master
34+
uses: pypa/gh-action-pypi-publish@release/v1
3535
with:
36-
user: jazzband
37-
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
38-
repository_url: https://jazzband.co/projects/django-oauth-toolkit/upload
36+
user: __token__
37+
password: ${{ secrets.PYPI_PUBLISH_TOKEN }}

.github/workflows/test.yml

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,50 @@ name: Test
22

33
on: [push, pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
59
jobs:
610
test-package:
711
name: Test Package (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
812
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write # Required for Codecov OIDC token
915
strategy:
1016
fail-fast: false
1117
matrix:
1218
python-version:
1319
- '3.10'
1420
- '3.11'
1521
- '3.12'
22+
- '3.13'
1623
django-version:
1724
- '4.2'
1825
- '5.0'
1926
- '5.1'
27+
- '5.2'
2028
- 'main'
29+
## include/exclude combinations, typically for the newest and oldest django/python versions.
2130
include:
2231
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
2332
- python-version: '3.8'
2433
django-version: '4.2'
2534
- python-version: '3.9'
2635
django-version: '4.2'
36+
- python-version: '3.14'
37+
django-version: '5.2'
38+
- python-version: '3.14'
39+
django-version: 'main'
40+
exclude:
41+
- python-version: '3.13'
42+
django-version: '5.0'
43+
- python-version: '3.13'
44+
django-version: '4.2'
45+
- python-version: '3.10'
46+
django-version: 'main'
47+
- python-version: '3.11'
48+
django-version: 'main'
2749

2850
steps:
2951
- uses: actions/checkout@v4
@@ -40,7 +62,7 @@ jobs:
4062
echo "::set-output name=dir::$(pip cache dir)"
4163
4264
- name: Cache
43-
uses: actions/cache@v3
65+
uses: actions/cache@v4
4466
with:
4567
path: ${{ steps.pip-cache.outputs.dir }}
4668
key:
@@ -60,9 +82,10 @@ jobs:
6082
DJANGO: ${{ matrix.django-version }}
6183

6284
- name: Upload coverage
63-
uses: codecov/codecov-action@v3
85+
uses: codecov/codecov-action@v5
6486
with:
6587
name: Python ${{ matrix.python-version }}
88+
use_oidc: true
6689

6790
test-demo-rp:
6891
name: Test Demo Relying Party
@@ -71,14 +94,14 @@ jobs:
7194
fail-fast: false
7295
matrix:
7396
node-version:
74-
- "18.x"
75-
- "20.x"
97+
- "22.x"
98+
- "24.x"
7699
steps:
77100
- name: Checkout
78101
uses: actions/checkout@v4
79102

80103
- name: Set up NodeJS
81-
uses: actions/setup-node@v2
104+
uses: actions/setup-node@v4
82105
with:
83106
node-version: ${{ matrix.node-version }}
84107

@@ -94,10 +117,32 @@ jobs:
94117
run: npm run build
95118
working-directory: tests/app/rp
96119

120+
codecov-notify:
121+
needs:
122+
- test-package
123+
- test-demo-rp
124+
runs-on: ubuntu-latest
125+
name: Codecov Notify
126+
permissions:
127+
id-token: write # Required for Codecov OIDC token
128+
steps:
129+
# - tell codecov to send notifications now that all jobs are complete.
130+
# without this, codecov may notify before all coverage reports have been uploaded.
131+
# `codecov: notify: manual_trigger: true` must be set in codecov.yml, to prevent
132+
# processing on every upload.
133+
# - preferred to after_n_builds so we don't need to update that number every
134+
# time we add/remove jobs.
135+
- name: Notify Codecov
136+
uses: codecov/codecov-action@v5
137+
with:
138+
run_command: 'send-notifications'
139+
use_oidc: true
140+
97141
success:
98142
needs:
99143
- test-package
100144
- test-demo-rp
145+
- codecov-notify
101146
runs-on: ubuntu-latest
102147
name: Test successful
103148
steps:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ db.sqlite3
5757
venv/
5858

5959
/tests/app/idp/static
60+
61+
*.orig

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.6.8
3+
rev: v0.12.7
44
hooks:
55
- id: ruff
66
args: [ --fix ]
77
- id: ruff-format
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.6.0
9+
rev: v5.0.0
1010
hooks:
1111
- id: check-ast
1212
- id: trailing-whitespace
@@ -22,7 +22,7 @@ repos:
2222
- id: sphinx-lint
2323
# Configuration for codespell is in pyproject.toml
2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.3.0
25+
rev: v2.4.1
2626
hooks:
2727
- id: codespell
2828
exclude: (package-lock.json|/locale/)

AUTHORS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Bart Merenda
3535
Bas van Oostveen
3636
Brian Helba
3737
Carl Schwan
38+
Cihad GUNDOGDU
3839
Daniel Golding
3940
Daniel 'Vector' Kerr
4041
Darrel O'Pry
@@ -112,6 +113,7 @@ Sora Yanai
112113
Sören Wegener
113114
Spencer Carroll
114115
Stéphane Raimbault
116+
Thales Barbosa Bento
115117
Tom Evans
116118
Vinay Karanam
117119
Víðir Valberg Guðmundsson
@@ -122,4 +124,6 @@ Wouter Klein Heerenbrink
122124
Yaroslav Halchenko
123125
Yuri Savin
124126
Miriam Forner
125-
Tuhin Mitra
127+
Tuhin Mitra
128+
Alex Kerkum
129+
q0w

CHANGELOG.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
87
## [unreleased]
8+
99
### Added
10-
* Support for Wildcard Origin and Redirect URIs, https://github.com/jazzband/django-oauth-toolkit/issues/1506
10+
* Support for Django 5.2
11+
* Support for Python 3.14 (Django >= 5.2.8)
12+
1113
<!--
1214
### Changed
1315
### Deprecated
@@ -16,6 +18,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1618
### Security
1719
-->
1820

21+
## [3.1.0]
22+
23+
24+
**NOTE**: This is the first release under the new [django-oauth](https://github.com/django-oauth) organization. The project moved in order to be more independent and to bypass quota limits on parallel CI jobs we were encountering in Jazzband. The project will emulateDjango Commons going forward in it's operation. We're always on the look for willing maintainers and contributors. Feel free to start participating any time. PR's are always welcome.
25+
26+
### Added
27+
* #1506 Support for Wildcard Origin and Redirect URIs - Adds a new setting [ALLOW_URL_WILDCARDS](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#allow-uri-wildcards). This feature is useful for working with CI service such as cloudflare, netlify, and vercel that offer branch
28+
deployments for development previews and user acceptance testing.
29+
* #1586 Turkish language support added
30+
31+
### Changed
32+
The project is now hosted in the django-oauth organization.
33+
34+
<!--
35+
### Deprecated
36+
### Removed
37+
-->
38+
### Fixed
39+
* #1517 OP prompts for logout when no OP session
40+
* #1512 client_secret not marked sensitive
41+
* #1521 Fix 0012 migration loading access token table into memory
42+
* #1584 Fix IDP container in docker compose environment could not find templates and static files.
43+
* #1562 Fix: Handle AttributeError in IntrospectTokenView
44+
* #1583 Fix: Missing pt_BR translations
45+
<!--
46+
### Security
47+
-->
48+
1949

2050
## [unreleased]
2151
### Fixed
@@ -235,7 +265,7 @@ This is a major release with **BREAKING** changes. Please make sure to review th
235265
## [1.6.1] 2021-12-23
236266

237267
### Changed
238-
* Note: Only Django 4.0.1+ is supported due to a regression in Django 4.0.0. [Explanation](https://github.com/jazzband/django-oauth-toolkit/pull/1046#issuecomment-998015272)
268+
* Note: Only Django 4.0.1+ is supported due to a regression in Django 4.0.0. [Explanation](https://github.com/django-oauth/django-oauth-toolkit/pull/1046#issuecomment-998015272)
239269

240270
### Fixed
241271
* Miscellaneous 1.6.0 packaging issues.
@@ -326,7 +356,7 @@ This is a major release with **BREAKING** changes. Please make sure to review th
326356

327357
### Fixed
328358
* #812: Reverts #643 pass wrong request object to authenticate function.
329-
* Fix concurrency issue with refresh token requests (#[810](https://github.com/jazzband/django-oauth-toolkit/pull/810))
359+
* Fix concurrency issue with refresh token requests (#[810](https://github.com/django-oauth/django-oauth-toolkit/pull/810))
330360
* #817: Reverts #734 tutorial documentation error.
331361

332362

@@ -365,16 +395,16 @@ This is a major release with **BREAKING** changes. Please make sure to review th
365395

366396
### Fixed
367397
* Fix a race condition in creation of AccessToken with external oauth2 server.
368-
* Fix several concurrency issues. (#[638](https://github.com/jazzband/django-oauth-toolkit/issues/638))
369-
* Fix to pass `request` to `django.contrib.auth.authenticate()` (#[636](https://github.com/jazzband/django-oauth-toolkit/issues/636))
398+
* Fix several concurrency issues. (#[638](https://github.com/django-oauth/django-oauth-toolkit/issues/638))
399+
* Fix to pass `request` to `django.contrib.auth.authenticate()` (#[636](https://github.com/django-oauth/django-oauth-toolkit/issues/636))
370400
* Fix missing `oauth2_error` property exception oauthlib_core.verify_request method raises exceptions in authenticate.
371-
(#[633](https://github.com/jazzband/django-oauth-toolkit/issues/633))
401+
(#[633](https://github.com/django-oauth/django-oauth-toolkit/issues/633))
372402
* Fix "django.db.utils.NotSupportedError: FOR UPDATE cannot be applied to the nullable side of an outer join" for postgresql.
373-
(#[714](https://github.com/jazzband/django-oauth-toolkit/issues/714))
403+
(#[714](https://github.com/django-oauth/django-oauth-toolkit/issues/714))
374404
* Fix to return a new refresh token during grace period rather than the recently-revoked one.
375-
(#[702](https://github.com/jazzband/django-oauth-toolkit/issues/702))
405+
(#[702](https://github.com/django-oauth/django-oauth-toolkit/issues/702))
376406
* Fix a bug in refresh token revocation.
377-
(#[625](https://github.com/jazzband/django-oauth-toolkit/issues/625))
407+
(#[625](https://github.com/django-oauth/django-oauth-toolkit/issues/625))
378408

379409
## 1.2.0 [2018-06-03]
380410

@@ -396,7 +426,7 @@ This is a major release with **BREAKING** changes. Please make sure to review th
396426
* **Critical**: Django OAuth Toolkit 1.1.0 contained a migration that would revoke all existing
397427
RefreshTokens (`0006_auto_20171214_2232`). This release corrects the migration.
398428
If you have already ran it in production, please see the following issue for more details:
399-
https://github.com/jazzband/django-oauth-toolkit/issues/589
429+
https://github.com/django-oauth/django-oauth-toolkit/issues/589
400430

401431

402432
## 1.1.0 [2018-04-13]
@@ -410,7 +440,7 @@ This is a major release with **BREAKING** changes. Please make sure to review th
410440
* **New feature**: The new setting `ERROR_RESPONSE_WITH_SCOPES` can now be set to True to include required
411441
scopes when DRF authorization fails due to improper scopes.
412442
* **New feature**: The new setting `REFRESH_TOKEN_GRACE_PERIOD_SECONDS` controls a grace period during which
413-
refresh tokens may be re-used.
443+
refresh tokens may be reused.
414444
* An `app_authorized` signal is fired when a token is generated.
415445

416446
## 1.0.0 [2017-06-07]

0 commit comments

Comments
 (0)