Skip to content

Commit

Permalink
upgrade oauth to support django 4+
Browse files Browse the repository at this point in the history
  • Loading branch information
assumpcaoeduardo committed Sep 25, 2023
1 parent fe90f92 commit 42e8992
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Step 1: `pip install django-admin-oauth2` and include it in your project's requi
Step 2: Include the django-admin-oauth2 urlconf in your project's urls.py:

```python
url(r'/admin/oauth/', include('oauthadmin.urls'))
re_path(r'/admin/oauth/', include('oauthadmin.urls'))
```

Step 3: Include oauthadmin in your INSTALLED_APPS:
Expand Down Expand Up @@ -85,6 +85,7 @@ When the CSRF validation token doesn't match, django-admin-oauth2 will redirect


## Changelog
* 1.2.1: Add support for django 4
* 1.2.0: Allow overriding oauth scope with new parameter, OAUTHADMIN_SCOP
* 1.1.3: Bugfix in adminsite (tabs vs spaces)
* 1.1.2: Add support for django 2
Expand Down
10 changes: 5 additions & 5 deletions oauthadmin/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.conf.urls import url
from django.urls import re_path
import oauthadmin.views

urlpatterns = [
url(r'login/', oauthadmin.views.login),
url(r'callback/', oauthadmin.views.callback),
url(r'logout/', oauthadmin.views.logout),
url(r'logout_redirect/', oauthadmin.views.logout_redirect),
re_path(r'login/', oauthadmin.views.login),
re_path(r'callback/', oauthadmin.views.callback),
re_path(r'logout/', oauthadmin.views.logout),
re_path(r'logout_redirect/', oauthadmin.views.logout_redirect),
]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='django-admin-oauth2',
version='1.2.0',
version='1.2.1',
description='A django app that replaces the django admin authentication mechanism by deferring to an oauth2 provider',
long_description=README,
url='https://github.com/RealGeeks/django-admin-oauth2',
Expand Down

0 comments on commit 42e8992

Please sign in to comment.