Skip to content
Snippets Groups Projects
Commit 989e205d authored by Gareth Hughes's avatar Gareth Hughes
Browse files

attempt to add django-scim2

parent 2949716a
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,7 @@ INSTALLED_APPS = [ ...@@ -42,6 +42,7 @@ INSTALLED_APPS = [
'rest_framework', 'rest_framework',
'corsheaders', 'corsheaders',
'django_filters', 'django_filters',
'django_scim'
] ]
#DATABASES = { #DATABASES = {
...@@ -63,7 +64,8 @@ MIDDLEWARE = [ ...@@ -63,7 +64,8 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'mozilla_django_oidc.middleware.SessionRefresh', 'mozilla_django_oidc.middleware.SessionRefresh',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware' 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django_scim.middleware.SCIMAuthCheckMiddleware'
] ]
...@@ -245,6 +247,19 @@ try: ...@@ -245,6 +247,19 @@ try:
except: except:
OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS = 36000 OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS = 36000
# SCIM Settings
SCIM_SERVICE_PROVIDER = {
'NETLOC': 'localhost',
'AUTHENTICATION_SCHEMES': [
{
'type': 'oauth2',
'name': 'OAuth 2',
'description': 'Oauth 2 implemented with bearer token',
},
],
}
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
# preferably read the SECRET_KEY from the environment # preferably read the SECRET_KEY from the environment
try: try:
......
...@@ -23,4 +23,5 @@ urlpatterns = [ ...@@ -23,4 +23,5 @@ urlpatterns = [
path('esap-api/ida/', include('ida.api.urls')), path('esap-api/ida/', include('ida.api.urls')),
path('esap-api/admin/', admin.site.urls, name='admin-view'), path('esap-api/admin/', admin.site.urls, name='admin-view'),
re_path('^esap-api/oidc/', include('mozilla_django_oidc.urls')), re_path('^esap-api/oidc/', include('mozilla_django_oidc.urls')),
path('scim/v2/', include('django_scim.urls')),
] ]
::::::::::::::
requirements/base.txt
::::::::::::::
#cython==0.29.14 #cython==0.29.14
#cryptography #cryptography
Django==3.1.4 Django==3.1.4
...@@ -5,7 +8,6 @@ django-filter==2.3.0 ...@@ -5,7 +8,6 @@ django-filter==2.3.0
djangorestframework==3.11.1 djangorestframework==3.11.1
django-cors-headers==3.7.0 django-cors-headers==3.7.0
whitenoise==5.0.1 whitenoise==5.0.1
numpy==1.18.1
astropy==4.0 astropy==4.0
PyYAML==5.4.1 PyYAML==5.4.1
pyvo==1.0 pyvo==1.0
...@@ -14,3 +16,4 @@ django-rest-knox==4.1.0 ...@@ -14,3 +16,4 @@ django-rest-knox==4.1.0
mozilla-django-oidc==1.2.4 mozilla-django-oidc==1.2.4
panoptes-client==1.2.0 panoptes-client==1.2.0
eossr==0.2 eossr==0.2
django-scim2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment