Add-on to django-lti to support dynamic registration.
Project description
django-lti-authentication
Add-on to django-lti that integrates with Django's user authentication system.
Installation
Install the package using pip:
pip install django-lti-authentication
Setup
Start by adding lti_authentication.backends.LtiLaunchAuthenticationBackend to your project's AUTHENTICATION_BACKENDS.
AUTHENTICATION_BACKENDS = [
...
'lti_authentication.backends.LtiLaunchAuthenticationBackend',
]
Then, add lti_authentication.middleware.LtiLaunchAuthenticationMiddleware to the MIDDLEWARE setting.
It's important to list the LtiLaunchAuthenticationMiddleware after LtiLaunchMiddleware and
AuthenticationMiddleware.
MIDDLEWARE = [
'lti_tool.middleware.LtiLaunchMiddleware',
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'lti_authentication.middleware.LtiLaunchAuthenticationMiddleware',
]
Configuring the Django username
By default, the username is set to the sub value from the LTI launch. You can use the person_sourcedid
value from the lis claim instead by adding this to your Django settings:
LTI_AUTHENTICATION = {
'use_person_sourcedid': True,
}
If you want to use a different field, you can subclass LtiLaunchAuthenticationBackend and override the
get_username method.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_lti_authentication-0.1.1.tar.gz.
File metadata
- Download URL: django_lti_authentication-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
641f55e3a8590c9548414a9b12ad585144fccfd44bd5a816ca3800350948e054
|
|
| MD5 |
8bdacf660b3e1c113b69fc03ba1fd7f8
|
|
| BLAKE2b-256 |
018d0eff7a4ffb89333d5b0f412a6dbe8a90cdb91db12194704adc0536945659
|
File details
Details for the file django_lti_authentication-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_lti_authentication-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d39d2a05f83a8322d2564e22dda49859f52a84bf051535d0ff65ea93e956a90
|
|
| MD5 |
51bae2faeb29074d26dd5ea3228924ea
|
|
| BLAKE2b-256 |
a5bf5ecfd7b555d9c97463fe483d9bc71b4c9f094a9ff53c937ca53b81ae7c8d
|