Moved azure login to local app. Removed ability for new users to be created automatically

This commit is contained in:
John Mullins
2023-12-15 15:00:41 +11:00
parent 7519585c84
commit 1240ab2538
9 changed files with 247 additions and 3 deletions
+3 -3
View File
@@ -34,6 +34,7 @@ ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split(' ')
INSTALLED_APPS = [
'coord.apps.CoordConfig',
# 'mail_templates.apps.MailTemplatesConfig',
'custom_user.apps.CustomUserConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -42,7 +43,6 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'import_export',
'rangefilter',
'azure_auth',
]
TWILIO = {
@@ -65,8 +65,8 @@ MIDDLEWARE = [
]
if "AZURE_CLIENT_ID" in os.environ:
AUTHENTICATION_BACKENDS = ("azure_auth.backends.AzureBackend",)
MIDDLEWARE.append('azure_auth.middleware.AzureMiddleware')
AUTHENTICATION_BACKENDS = ("custom_user.backends.AzureBackend",)
MIDDLEWARE.append('custom_user.middleware.AzureMiddleware')
LOGIN_URL = "/azure_auth/login"
AZURE_AUTH = {
"CLIENT_ID": os.environ.get('AZURE_CLIENT_ID'),