Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3bde632
Revert "Openid Connect Core support - Round 2 (#859)" (#877)
n2ygk Oct 6, 2020
1b2d73d
Updated url() to path()
smithdc1 Oct 10, 2020
342a634
Update changelog for 1.3.3 release (#889)
MattBlack85 Oct 16, 2020
02a872c
release 1.3.3 (#890)
n2ygk Oct 20, 2020
0a62a97
improve contributing docs (#891)
n2ygk Oct 20, 2020
6f08e3b
Make calls to super() more python3 (#881)
smithdc1 Oct 23, 2020
a3c085e
pass PKCE fields to AuthorizationView form (#896)
skarzi Nov 12, 2020
6dc1ca2
Fixed some grammar and spelling mistakes in the docs. (#895)
PoDuck Nov 13, 2020
29bed25
Added Python 3.9 to test matrix for djangomaster (#884)
smithdc1 Nov 14, 2020
afd651c
Updated supported Django versions
smithdc1 Nov 14, 2020
c2f379d
Removed universal wheels (py2)
smithdc1 Nov 14, 2020
5cb5398
Use black for formatting the code (#887)
tevansuk Nov 17, 2020
86e78b9
#898 Added the ability to customize classes for django admin (#904)
folt Dec 16, 2020
f344b06
Disable 255 chars length limit for redirect uri (#902) (#903)
shaddeus Dec 18, 2020
6af081c
Migrate to GitHub Actions (#907)
MattBlack85 Dec 21, 2020
3010059
Use SVG for all badges.
jezdez Dec 21, 2020
331b49d
Fix select for update (#906)
dag18e Feb 7, 2021
ca90e8f
Add live docs rebuilding using sphinx-autobuild (#916)
tevansuk Feb 7, 2021
b9083eb
Update docs to inform that the default ACCESS_TOKEN_EXPIRE_SECONDS is…
damaestro Feb 7, 2021
e1760df
Add pt-PT translation (#920)
n2ygk Feb 8, 2021
37640ee
Release 1.4.0 (#921)
n2ygk Feb 8, 2021
41aa49e
new style middleware
dulmandakh Feb 16, 2021
e3207d8
Rename Django's dev branch to main. (#932)
jezdez Mar 9, 2021
ffff6b6
Remove italics from "Models" section header (#927)
adamchainz Mar 9, 2021
1ada5af
Run lint in Github Actions (#933)
tevansuk Mar 9, 2021
4c6f059
Fix wrong import (#930)
deoktr Mar 9, 2021
e09e7d4
Fix weird grammar in messages on authorize screen (#935)
willbeaufoy Mar 10, 2021
062408a
GitHub Actions: smart run strategy (#937)
Mar 10, 2021
d6d1f99
Revert "GitHub Actions: smart run strategy (#937)" (#939)
Mar 10, 2021
2555156
Drop retired Python 3.5 (#936)
Mar 10, 2021
c0a9ac9
1.4.1 release (#940)
n2ygk Mar 12, 2021
b56987e
OpenID Connect support (#915)
tevansuk Mar 17, 2021
cc767e4
Replace reference to defunct Google Group with opening a GitHub Issue…
n2ygk Mar 18, 2021
671bfda
update namespace error in example
aryaniyaps Mar 17, 2021
592398c
Update AUTHORS
aryaniyaps Mar 17, 2021
5d53d24
Release 1.5.0 (#947)
n2ygk Mar 22, 2021
993f67b
Merge tag '1.5.0' into 1.5.0-grn
ryanluker Mar 30, 2023
4bd9edc
Fixup Readme for the short term local dev
ryanluker Mar 30, 2023
28506db
Only test python 3.9
ryanluker Mar 30, 2023
77bf66d
Use self with settings to match rest of tests
mackosx Mar 30, 2023
347724a
Remove test since generate_at_hash no longer exists
mackosx Mar 30, 2023
ee9054a
Move out test so we can use the request factory
mackosx Mar 30, 2023
87bb44b
Fix test
ryanluker Mar 30, 2023
3622206
Add back old migration auto3
ryanluker Mar 30, 2023
e4d5e1b
Add merge migration
ryanluker Mar 30, 2023
32f0051
Add back token on id token
ryanluker Mar 30, 2023
dc0dd81
Add migration for new values
ryanluker Mar 30, 2023
40ace71
Rewrite migration 0004 to remove already applied
ryanluker Mar 30, 2023
af476e9
Can remove custom iat because oauthlib uses time.time()
mackosx Mar 30, 2023
3ffb051
Remove unneeded aud claim, its provided by oauthlib
mackosx Mar 31, 2023
f87d071
Double write token and jti fields
mackosx Mar 31, 2023
2e734e5
Lookup using token for now
mackosx Mar 31, 2023
3897436
Use correct token
mackosx Mar 31, 2023
2cf5391
Update todos to refer to tickets
mackosx Mar 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[{Makefile,setup.cfg}]
indent_style = tab

[*.{yml,yaml}]
indent_size = 2
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
if: github.repository == 'jazzband/django-oauth-toolkit'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel

- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
twine check dist/*

- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/django-oauth-toolkit/upload
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.9']

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}


- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"

- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions

- name: Tox tests
run: |
tox -v

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ __pycache__
pip-log.txt

# Unit test / coverage reports
.cache
.pytest_cache
.coverage
coverage.xml
.tox
.pytest_cache/
nosetests.xml
Expand Down
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-ast
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- id: mixed-line-ending
args: ['--fix=lf']
- repo: https://github.com/PyCQA/isort
rev: 5.6.3
hooks:
- id: isort
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

29 changes: 23 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,43 @@ Contributors
============

Abhishek Patel
Alessandro De Angelis
Alan Crosswell
Aleksander Vaskevich
Alessandro De Angelis
Allisson Azevedo
Anvesh Agarwal
Asif Saif Uddin
Ash Christopher
Aristóbulo Meneses
Aryan Iyappan
Ash Christopher
Asif Saif Uddin
Bart Merenda
Bas van Oostveen
Dave Burkholder
David Fischer
David Smith
Diego Garcia
Dulmandakh Sukhbaatar
Dylan Giesler
Emanuele Palazzetti
Federico Dolce
Frederico Vieira
Hiroki Kiyohara
Jens Timmerman
Jerome Leclanche
Jim Graham
Jonathan Steffan
Jun Zhou
Kristian Rune Larsen
Paul Oswald
pySilver
Pavel Tvrdík
Rodney Richardson
Rustem Saiargaliev
Sandro Rodrigues
Shaun Stanworth
Silvano Cerza
Spencer Carroll
Stéphane Raimbault
Jun Zhou
David Smith
Tom Evans
Will Beaufoy
pySilver
Łukasz Skarżyński
45 changes: 42 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!--
<!--
## [unreleased]
### Added
### Changed
Expand All @@ -14,14 +14,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
-->

## [unreleased]
## [1.5.0] 2021-03-18

### added
### Added
* #915 Add optional OpenID Connect support.

### Changed
* #942 Help via defunct Google group replaced with using GitHub issues

## [1.4.1] 2021-03-12

### Changed
* #925 OAuth2TokenMiddleware converted to new style middleware, and no longer extends MiddlewareMixin.

### Removed
* #936 Remove support for Python 3.5

## [1.4.0] 2021-02-08

### Added
* #917 Documentation improvement for Access Token expiration.
* #916 (for DOT contributors) Added `tox -e livedocs` which launches a local web server on `locahost:8000`
to display Sphinx documentation with live updates as you edit.
* #891 (for DOT contributors) Added [details](https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html)
on how best to contribute to this project.
* #884 Added support for Python 3.9
* #898 Added the ability to customize classes for django admin
* #690 Added pt-PT translations to HTML templates. This enables adding additional translations.

### Fixed
* #906 Made token revocation not apply a limit to the `select_for_update` statement (impacts Oracle 12c database).
* #903 Disable `redirect_uri` field length limit for `AbstractGrant`

## [1.3.3] 2020-10-16

### Added
* added `select_related` in intospect view for better query performance
* #831 Authorization token creation now can receive an expire date
* #831 Added a method to override Grant creation
* #825 Bump oauthlib to 3.1.0 to introduce PKCE
* Support for Django 3.1

### Fixed
* #847: Fix inappropriate message when response from authentication server is not OK.

### Changed
* few smaller improvements to remove older django version compatibility #830, #861, #862, #863

## [1.3.2] 2020-03-24

### Fixed
Expand Down
38 changes: 24 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ Django OAuth Toolkit

*OAuth2 goodies for the Djangonauts!*

.. image:: https://badge.fury.io/py/django-oauth-toolkit.png
.. image:: https://badge.fury.io/py/django-oauth-toolkit.svg
:target: http://badge.fury.io/py/django-oauth-toolkit

.. image:: https://travis-ci.org/jazzband/django-oauth-toolkit.png
:alt: Build Status
:target: https://travis-ci.org/jazzband/django-oauth-toolkit

.. image:: https://coveralls.io/repos/github/jazzband/django-oauth-toolkit/badge.svg?branch=master
:alt: Coverage Status
:target: https://coveralls.io/github/jazzband/django-oauth-toolkit?branch=master
.. image:: https://github.com/jazzband/django-oauth-toolkit/workflows/Test/badge.svg
:target: https://github.com/jazzband/django-oauth-toolkit/actions
:alt: GitHub Actions

.. image:: https://codecov.io/gh/jazzband/django-oauth-toolkit/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jazzband/django-oauth-toolkit
:alt: Coverage

If you are facing one or more of the following:
* Your Django app exposes a web API you want to protect with OAuth2 authentication,
Expand All @@ -42,7 +41,7 @@ Please report any security issues to the JazzBand security team at <security@jaz
Requirements
------------

* Python 3.5+
* Python 3.6+
* Django 2.1+
* oauthlib 3.1+

Expand Down Expand Up @@ -89,16 +88,27 @@ Developer Setup
---------------

To get started with running or building the module you will need to install a virtual environment::

python36 -m venv ~/venv/python36-django-oauth-toolkit
source ~/venv/python36-django-oauth-toolkit
```
python39 -m venv ~/venv/python39-django-oauth-toolkit
source ~/venv/python39-django-oauth-toolkit
```
or
```
pyenv install 3.9.16
pyenv virtualenv 3.9.16-toolkit
pyenv activate 3.9.16-toolkit
```
then
```
python setup.py install
python setup.py build
```

To run the tox tests for our specifically supported build use the following::

```
pip install tox
tox -e py36-django22
tox -e py39-django32
```

License
-------
Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,6 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

livehtml:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading