Skip to content

Commit e5d00dd

Browse files
committed
Enable django-lti-authentication
Allow for LTI authentication with Canvas.
1 parent 054de69 commit e5d00dd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

econplayground/settings_shared.py

+11
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
'django_cas_ng.middleware.CASMiddleware',
6161

6262
'lti_tool.middleware.LtiLaunchMiddleware',
63+
64+
'lti_authentication.middleware.LtiLaunchAuthenticationMiddleware',
6365
]
6466

6567
INSTALLED_APPS = [ # noqa
@@ -116,7 +118,12 @@
116118
AUTHENTICATION_BACKENDS = [
117119
'django.contrib.auth.backends.ModelBackend',
118120
'django_cas_ng.backends.CASBackend',
121+
122+
# django-lti-provider (LTI 1.1)
119123
'lti_provider.auth.LTIBackend',
124+
125+
# django-lti-authentication (LTI 1.3)
126+
'lti_authentication.backends.LtiLaunchAuthenticationBackend',
120127
]
121128

122129
CSRF_TRUSTED_ORIGINS = [
@@ -139,6 +146,10 @@
139146
'allow_ta_access': False
140147
}
141148

149+
LTI_AUTHENTICATION = {
150+
'use_person_sourcedid': True,
151+
}
152+
142153
TEMPLATES = [
143154
{
144155
'BACKEND': 'django.template.backends.django.DjangoTemplates',

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pyjwt==2.10.1 # pylti1p3
9393
jwcrypto==1.5.6 # pylti1p3
9494
PyLTI1p3==2.0.0 # django-lti
9595
django-lti==0.8.0
96+
django-lti-authentication==0.2.0
9697

9798
django-braces==1.17.0
9899
django-smtp-ssl==1.0

0 commit comments

Comments
 (0)