mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
add in SSO for #1421
This commit is contained in:
parent
28878b4b0d
commit
1311558cac
@ -249,6 +249,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'django.contrib.sites',
|
||||||
|
|
||||||
# InvenTree apps
|
# InvenTree apps
|
||||||
'build.apps.BuildConfig',
|
'build.apps.BuildConfig',
|
||||||
@ -279,6 +280,10 @@ INSTALLED_APPS = [
|
|||||||
'error_report', # Error reporting in the admin interface
|
'error_report', # Error reporting in the admin interface
|
||||||
'django_q',
|
'django_q',
|
||||||
'formtools', # Form wizard tools
|
'formtools', # Form wizard tools
|
||||||
|
|
||||||
|
'allauth', # Base app for SSO
|
||||||
|
'allauth.account', # Extend user with accounts
|
||||||
|
'allauth.socialaccount', # Use 'social' providers
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = CONFIG.get('middleware', [
|
MIDDLEWARE = CONFIG.get('middleware', [
|
||||||
@ -298,7 +303,8 @@ MIDDLEWARE = CONFIG.get('middleware', [
|
|||||||
MIDDLEWARE.append('error_report.middleware.ExceptionProcessor')
|
MIDDLEWARE.append('error_report.middleware.ExceptionProcessor')
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = CONFIG.get('authentication_backends', [
|
AUTHENTICATION_BACKENDS = CONFIG.get('authentication_backends', [
|
||||||
'django.contrib.auth.backends.ModelBackend'
|
'django.contrib.auth.backends.ModelBackend',
|
||||||
|
'allauth.account.auth_backends.AuthenticationBackend', # SSO login via external providers
|
||||||
])
|
])
|
||||||
|
|
||||||
# If the debug toolbar is enabled, add the modules
|
# If the debug toolbar is enabled, add the modules
|
||||||
@ -646,3 +652,5 @@ MESSAGE_TAGS = {
|
|||||||
messages.ERROR: 'alert alert-block alert-danger',
|
messages.ERROR: 'alert alert-block alert-danger',
|
||||||
messages.INFO: 'alert alert-block alert-info',
|
messages.INFO: 'alert alert-block alert-info',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SITE_ID = 1
|
||||||
|
@ -165,6 +165,7 @@ urlpatterns = [
|
|||||||
url(r'^api-doc/', include_docs_urls(title='InvenTree API')),
|
url(r'^api-doc/', include_docs_urls(title='InvenTree API')),
|
||||||
|
|
||||||
url(r'^markdownx/', include('markdownx.urls')),
|
url(r'^markdownx/', include('markdownx.urls')),
|
||||||
|
url(r'^accounts/', include('allauth.urls')), # SSO
|
||||||
]
|
]
|
||||||
|
|
||||||
# Server running in "DEBUG" mode?
|
# Server running in "DEBUG" mode?
|
||||||
|
@ -34,5 +34,6 @@ python-barcode[images]==0.13.1 # Barcode generator
|
|||||||
qrcode[pil]==6.1 # QR code generator
|
qrcode[pil]==6.1 # QR code generator
|
||||||
django-q==1.3.4 # Background task scheduling
|
django-q==1.3.4 # Background task scheduling
|
||||||
django-formtools==2.3 # Form wizard tools
|
django-formtools==2.3 # Form wizard tools
|
||||||
|
django-allauth==0.45.0 # SSO for external providers via OpenID
|
||||||
|
|
||||||
inventree # Install the latest version of the InvenTree API python library
|
inventree # Install the latest version of the InvenTree API python library
|
||||||
|
Loading…
x
Reference in New Issue
Block a user