feat: install django-oauth-toolkit to implement OpenID Connect #1
3 changed files with 48 additions and 2 deletions
|
@ -1,4 +1,35 @@
|
||||||
asgiref==3.5.2
|
asgiref==3.5.2
|
||||||
backports.zoneinfo==0.2.1
|
astroid==2.11.7
|
||||||
|
black==22.6.0
|
||||||
|
certifi==2022.6.15
|
||||||
|
cffi==1.15.1
|
||||||
|
charset-normalizer==2.1.1
|
||||||
|
click==8.1.3
|
||||||
|
coverage==6.4.4
|
||||||
|
cryptography==37.0.4
|
||||||
|
Deprecated==1.2.13
|
||||||
|
dill==0.3.5.1
|
||||||
Django==4.1
|
Django==4.1
|
||||||
|
django-oauth-toolkit==2.1.0
|
||||||
|
greenlet==1.1.2
|
||||||
|
idna==3.3
|
||||||
|
isort==5.10.1
|
||||||
|
jedi==0.18.1
|
||||||
|
jwcrypto==1.3.1
|
||||||
|
lazy-object-proxy==1.7.1
|
||||||
|
mccabe==0.7.0
|
||||||
|
msgpack==1.0.4
|
||||||
|
mypy-extensions==0.4.3
|
||||||
|
oauthlib==3.2.0
|
||||||
|
parso==0.8.3
|
||||||
|
pathspec==0.9.0
|
||||||
|
platformdirs==2.5.2
|
||||||
|
pycparser==2.21
|
||||||
|
pylint==2.14.5
|
||||||
|
pynvim==0.4.3
|
||||||
|
requests==2.28.1
|
||||||
sqlparse==0.4.2
|
sqlparse==0.4.2
|
||||||
|
tomli==2.0.1
|
||||||
|
tomlkit==0.11.4
|
||||||
|
urllib3==1.26.11
|
||||||
|
wrapt==1.14.1
|
||||||
|
|
|
@ -37,6 +37,8 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'oauth2_provider',
|
||||||
|
'accounts',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
@ -121,3 +123,15 @@ STATIC_URL = 'static/'
|
||||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
||||||
|
# OIDC django-oauth-toolkit
|
||||||
|
LOGIN_URL='/admin/login/'
|
||||||
|
|
||||||
|
OAUTH2_PROVIDER = {
|
||||||
|
"OIDC_ENABLED": True,
|
||||||
|
"PKCE_REQUIRED": False,
|
||||||
|
"SCOPES": {
|
||||||
|
"openid": "OpenID Connect scope",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -14,8 +14,9 @@ Including another URLconf
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||||
]
|
]
|
||||||
|
|
Reference in a new issue