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.
Metadata
Release files for django-lti-authentication 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_lti_authentication-0.2.0.tar.gz | 9.9 kB | Without provenance | Details for django_lti_authentication-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_lti_authentication-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for django_lti_authentication-0.2.0-py3-none-any.whl |
Total release size: 21.7 kB
Release files / django_lti_authentication-0.2.0.tar.gz
| Download URL | django_lti_authentication-0.2.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec4b1a6d9071e5115c11e76a31a89967088800601c0e7d729c7726cdd2701f2a
|
|
BLAKE2b-256 checksum How to use checksums |
ad18848ab13860553cd3fc239f37872fc800951decfaad9b594054c1aa28f9e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / django_lti_authentication-0.2.0-py3-none-any.whl
| Download URL | django_lti_authentication-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
815c115940b3555559759616b570219bc3a7a1ba37efb21b4e24f7cd52617034
|
|
BLAKE2b-256 checksum How to use checksums |
919e678c6d45f8b33bcb593dfbbb85fae4c813ecca0d279f2e17b06489485aa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for django-lti-authentication 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.