Skip to content

Commit c6b6cd4

Browse files
authored
Merge branch 'master' into fix/introspection
2 parents 178f315 + 6017f07 commit c6b6cd4

32 files changed

+312
-98
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: false
1010
max-parallel: 5
1111
matrix:
12-
python-version: ['3.6', '3.7', '3.8', '3.9']
12+
python-version: ['3.7', '3.8', '3.9', '3.10']
1313

1414
steps:
1515
- uses: actions/checkout@v2

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: 20.8b1
2+
- repo: https://github.com/psf/black
3+
rev: 21.12b0
44
hooks:
55
- id: black
66
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.0
8+
rev: v4.0.1
99
hooks:
1010
- id: check-ast
1111
- id: trailing-whitespace
@@ -16,12 +16,12 @@ repos:
1616
- id: mixed-line-ending
1717
args: ['--fix=lf']
1818
- repo: https://github.com/PyCQA/isort
19-
rev: 5.6.3
19+
rev: 5.10.1
2020
hooks:
2121
- id: isort
2222
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
23-
- repo: https://gitlab.com/pycqa/flake8
24-
rev: 3.8.4
23+
- repo: https://github.com/PyCQA/flake8
24+
rev: 4.0.1
2525
hooks:
2626
- id: flake8
2727
exclude: ^(oauth2_provider/migrations/|tests/migrations/)

.readthedocs.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
# .readthedocs.yml
1+
# .readthedocs.yaml
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44

55
# Required
66
version: 2
77

8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.9"
13+
# You can also specify other tool versions:
14+
# nodejs: "16"
15+
# rust: "1.55"
16+
# golang: "1.17"
17+
818
# Build documentation in the docs/ directory with Sphinx
919
sphinx:
10-
configuration: docs/conf.py
20+
configuration: docs/conf.py
21+
22+
# If using Sphinx, optionally build your docs in additional formats such as PDF
23+
# formats:
24+
# - pdf
1125

26+
# Optionally declare the Python requirements required to build your docs
1227
python:
13-
version: 3.7
14-
install:
15-
- requirements: docs/requirements.txt
28+
install:
29+
- requirements: docs/requirements.txt

AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Abhishek Patel
1111
Alan Crosswell
1212
Aleksander Vaskevich
1313
Alessandro De Angelis
14+
Alex Szabó
1415
Allisson Azevedo
1516
Andrew Chen Wang
1617
Anvesh Agarwal
@@ -45,6 +46,8 @@ Michael Howitz
4546
Paul Dekkers
4647
Paul Oswald
4748
Pavel Tvrdík
49+
Peter Carnesciali
50+
Petr Dlouhý
4851
Rodney Richardson
4952
Rustem Saiargaliev
5053
Sandro Rodrigues
@@ -59,3 +62,6 @@ Jadiel Teófilo
5962
pySilver
6063
Łukasz Skarżyński
6164
Shaheed Haque
65+
Andrea Greco
66+
Vinay Karanam
67+

CHANGELOG.md

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

17-
## [unreleased]
18-
* Remove support for Django 3.0
19-
* Add support for Django 3.2
20-
* #989 Change any HttpResponse to JsonResponse if possible
17+
## [Unreleased]
2118

19+
## [1.6.0] 2021-12-19
2220
### Added
23-
* #712, #636, #808. Calls to `django.contrib.auth.authenticate()` now pass a `request`
24-
to provide compatibility with backends that need one.
25-
* #950 Add support for RSA key rotation.
21+
* #949 Provide django.contrib.auth.authenticate() with a `request` for compatibiity with more backends (like django-axes).
22+
* #968, #1039 Add support for Django 3.2 and 4.0.
23+
* 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)
24+
* #953 Allow loopback redirect URIs using random ports as described in [RFC8252 section 7.3](https://datatracker.ietf.org/doc/html/rfc8252#section-7.3).
25+
* #972 Add Farsi/fa language support.
26+
* #978 OIDC: Add support for [rotating multiple RSA private keys](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#rotating-the-rsa-private-key).
27+
* #978 OIDC: Add new [OIDC_JWKS_MAX_AGE_SECONDS](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#oidc-jwks-max-age-seconds) to improve `jwks_uri` caching.
28+
* #967 OIDC: Add [additional claims](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#adding-claims-to-the-id-token) beyond `sub` to the id_token.
29+
* #1041 Add a search field to the Admin UI (e.g. for search for tokens by email address).
30+
31+
### Changed
32+
* #981 Require redirect_uri if multiple URIs are registered per [RFC6749 section 3.1.2.3](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2.3)
33+
* #991 Update documentation of [REFRESH_TOKEN_EXPIRE_SECONDS](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#refresh-token-expire-seconds) to indicate it may be `int` or `datetime.timedelta`.
34+
* #977 Update [Tutorial](https://django-oauth-toolkit.readthedocs.io/en/stable/tutorial/tutorial_01.html#) to show required `include`.
35+
36+
## Removed
37+
* #968 Remove support for Django 3.0 & 3.1 and Python 3.6
38+
* #1035 Removes default_app_config for Django Deprecation Warning
39+
* #1023 six should be dropped
2640

2741
### Fixed
28-
* #524 Restrict usage of timezone aware expire dates to Django projects with USE_TZ set to True.
29-
* #955 Avoid doubling of `oauth2_provider` urls mountpath in json response for OIDC view `ConnectDiscoveryInfoView`.
30-
Breaks existing OIDC discovery output
31-
* #953 Allow loopback redirect URIs with random ports using http scheme, localhost address and no explicit port
32-
configuration in the allowed redirect_uris for Oauth2 Applications (RFC8252)
42+
* #963 Fix handling invalid hex values in client query strings with a 400 error rather than 500.
43+
* #973 [Tutorial](https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_01.html#start-your-app) updated to use `django-cors-headers`.
44+
* #956 OIDC: Update documentation of [get_userinfo_claims](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#adding-information-to-the-userinfo-service) to add the missing argument.
45+
3346

3447
## [1.5.0] 2021-03-18
3548

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Code of Conduct
2+
3+
As contributors and maintainers of the Jazzband projects, and in the interest of
4+
fostering an open and welcoming community, we pledge to respect all people who
5+
contribute through reporting issues, posting feature requests, updating documentation,
6+
submitting pull requests or patches, and other activities.
7+
8+
We are committed to making participation in the Jazzband a harassment-free experience
9+
for everyone, regardless of the level of experience, gender, gender identity and
10+
expression, sexual orientation, disability, personal appearance, body size, race,
11+
ethnicity, age, religion, or nationality.
12+
13+
Examples of unacceptable behavior by participants include:
14+
15+
- The use of sexualized language or imagery
16+
- Personal attacks
17+
- Trolling or insulting/derogatory comments
18+
- Public or private harassment
19+
- Publishing other's private information, such as physical or electronic addresses,
20+
without explicit permission
21+
- Other unethical or unprofessional conduct
22+
23+
The Jazzband roadies have the right and responsibility to remove, edit, or reject
24+
comments, commits, code, wiki edits, issues, and other contributions that are not
25+
aligned to this Code of Conduct, or to ban temporarily or permanently any contributor
26+
for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
27+
28+
By adopting this Code of Conduct, the roadies commit themselves to fairly and
29+
consistently applying these principles to every aspect of managing the jazzband
30+
projects. Roadies who do not follow or enforce the Code of Conduct may be permanently
31+
removed from the Jazzband roadies.
32+
33+
This code of conduct applies both within project spaces and in public spaces when an
34+
individual is representing the project or its community.
35+
36+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
37+
contacting the roadies at `[email protected]`. All complaints will be reviewed and
38+
investigated and will result in a response that is deemed necessary and appropriate to
39+
the circumstances. Roadies are obligated to maintain confidentiality with regard to the
40+
reporter of an incident.
41+
42+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version
43+
1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version]
44+
45+
[homepage]: https://contributor-covenant.org
46+
[version]: https://contributor-covenant.org/version/1/3/0/

LICENSE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ Copyright (c) 2013, Massimiliano Pippi, Federico Frenguelli and contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
5-
modification, are permitted provided that the following conditions are met:
5+
modification, are permitted provided that the following conditions are met:
66

77
1. Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
8+
list of conditions and the following disclaimer.
99
2. Redistributions in binary form must reproduce the above copyright notice,
1010
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
11+
and/or other materials provided with the distribution.
1212

1313
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1414
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -22,5 +22,5 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2222
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2323

2424
The views and conclusions contained in the software and documentation are those
25-
of the authors and should not be interpreted as representing official policies,
25+
of the authors and should not be interpreted as representing official policies,
2626
either expressed or implied, of the FreeBSD Project.

README.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ capabilities to your Django projects. Django OAuth Toolkit makes extensive use o
3535
`OAuthLib <https://github.com/idan/oauthlib>`_, so that everything is
3636
`rfc-compliant <http://tools.ietf.org/html/rfc6749>`_.
3737

38+
Note: If you have issues installing Django 4.0.0, it is because we only support
39+
Django 4.0.1+ due to a regression in Django 4.0.0. Besides 4.0.0, Django 2.2+ is supported.
40+
`Explanation <https://github.com/jazzband/django-oauth-toolkit/pull/1046#issuecomment-998015272>`.
41+
3842
Contributing
3943
------------
4044

@@ -49,8 +53,8 @@ Please report any security issues to the JazzBand security team at <security@jaz
4953
Requirements
5054
------------
5155

52-
* Python 3.6+
53-
* Django 2.2+
56+
* Python 3.7+
57+
* Django 2.2, 3.2, or >=4.0.1
5458
* oauthlib 3.1+
5559

5660
Installation

docs/contributing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ When you begin your PR, you'll be asked to provide the following:
154154
If your PR is not yet ready to be merged mark it as a Work-in-Progress
155155
By prepending `WIP:` to the PR title so that it doesn't get inadvertently approved and merged.
156156

157-
The repo managers will be notified of your pull request and it will be reviewed, in the meantime you can continue to add
157+
Make sure to request a review by assigning Reviewer `jazzband/django-oauth-toolkit`.
158+
This will assign the review to the project team and a member will review it. In the meantime you can continue to add
158159
commits to your topic branch (and push them up to GitHub) either if you see something that needs changing, or in
159160
response to a reviewer's comments. If a reviewer asks for changes, you do not need to close the pull and reissue it
160161
after making changes. Just make the changes locally, push them to GitHub, then add a comment to the discussion section

docs/getting_started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Edit :file:`users/models.py` adding the code below:
8787
.. code-block:: python
8888
8989
from django.contrib.auth.models import AbstractUser
90-
90+
9191
class User(AbstractUser):
9292
pass
9393
@@ -213,8 +213,8 @@ Create a user::
213213

214214
Username: wiliam
215215
Email address: [email protected]
216-
Password:
217-
Password (again):
216+
Password:
217+
Password (again):
218218
Superuser created successfully.
219219

220220
OAuth2 Authorization Grants

0 commit comments

Comments
 (0)