MIT Open Learning django app extensions for oauth toolkit
Project description
mitol-django-oauth-toolkit-extensions
This is the Open Learning's extensions to django-oauth-toolkit
.
Getting started
pip install mitol-django-oauth-toolkit-extensions
Configuration
Add the following to settings.py
:
INSTALLED_APPS = [
...
"mitol.oauth_toolkit_extensions.apps.OAuthToolkitExtensionsApp",
]
# required for migrations
OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL = 'oauth2_provider.AccessToken'
OAUTH2_PROVIDER_APPLICATION_MODEL = 'oauth2_provider.Application'
OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL = 'oauth2_provider.RefreshToken'
OAUTH2_PROVIDER = {
...
# enable the custom scopes backends
"SCOPES_BACKEND_CLASS": "mitol.oauth_toolkit_extensions.backends.ApplicationAccessOrSettingsScopes",
}
Usage
After installing this app, a modified Application
django-admin interface (/admin/oauth2_provider/application/) is available that allows you to optionally create an ApplicationAccess
record. If you create this record, it will limit scope authorization to the scopes specified in that record. Otherwise the allowed scopes will be derived from settings.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for mitol-django-oauth-toolkit-extensions-2023.12.19.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b28aa917c086708cd437c59fa729aa9701986f1645b0f35b82dcc97fa6effb8 |
|
MD5 | b0d8d72f4cdb8c4b8a06f1ad6e714170 |
|
BLAKE2b-256 | 5a41f0c466eeca2a72d993d99fc16fb91a9a783aa4f0f364e29ff4eb13a85972 |
Close
Hashes for mitol_django_oauth_toolkit_extensions-2023.12.19.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e0aa4ddb8c37cd63bb9429f8a0ce8064a04d19f0704b3a6a866e0f737a6428 |
|
MD5 | ae228f0dd72c46781e33b7ced6784e03 |
|
BLAKE2b-256 | ce07f666fd5f0d24becae7678d33c2008d7bc54c467c1739f75b13c17f5a02c4 |