diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2020-08-11 19:14:42 +0000 |
---|---|---|
committer | Adam Hassick <ahassick@iol.unh.edu> | 2020-12-04 14:20:41 -0500 |
commit | aa4c5be520939d1e5f45015033a03981477b966a (patch) | |
tree | 1742c571ce002ed160c84a7584ef3c048f41e9e4 /src/laas_dashboard/settings.py | |
parent | 6e7d8af810619e7ea3d14a612c735892c5ff1a84 (diff) |
Revert "Revert "Enable OpenID""
This reverts commit 57d1635845df4a8b045805b66e8fbec5010ce97f.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I18b59409bc5b89ac5b82f767e7af52c43ae668b8
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/laas_dashboard/settings.py')
-rw-r--r-- | src/laas_dashboard/settings.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/laas_dashboard/settings.py b/src/laas_dashboard/settings.py index 86778c1..92f763f 100644 --- a/src/laas_dashboard/settings.py +++ b/src/laas_dashboard/settings.py @@ -31,6 +31,7 @@ INSTALLED_APPS = [ 'analytics', 'django.contrib.admin', 'django.contrib.auth', + 'mozilla_django_oidc', # needs to be defined after auth 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', @@ -38,7 +39,7 @@ INSTALLED_APPS = [ 'django.contrib.humanize', 'bootstrap4', 'rest_framework', - 'rest_framework.authtoken' + 'rest_framework.authtoken', ] MIDDLEWARE = [ @@ -52,6 +53,20 @@ MIDDLEWARE = [ 'account.middleware.TimezoneMiddleware', ] +AUTHENTICATION_BACKENDS = ['account.views.MyOIDCAB'] + + +# OpenID Authentications +OIDC_RP_CLIENT_ID = os.environ['OIDC_CLIENT_ID'] +OIDC_RP_CLIENT_SECRET = os.environ['OIDC_CLIENT_SECRET'] + +OIDC_OP_AUTHORIZATION_ENDPOINT = os.environ['OIDC_AUTHORIZATION_ENDPOINT'] +OIDC_OP_TOKEN_ENDPOINT = os.environ['OIDC_TOKEN_ENDPOINT'] +OIDC_OP_USER_ENDPOINT = os.environ['OIDC_USER_ENDPOINT'] + +LOGIN_REDIRECT_URL = os.environ['DASHBOARD_URL'] +LOGOUT_REDIRECT_URL = os.environ['DASHBOARD_URL'] + ROOT_URLCONF = 'laas_dashboard.urls' TEMPLATE_OVERRIDE = os.environ.get("TEMPLATE_OVERRIDE_DIR", "") # the user's custom template dir |