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-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9275f7b2e1084ad6f63ca0e7996ce992e3149a0049442995c716c1e9f69e466f |
|
MD5 | a05751ec7dc0b16722d6cbeef72065ae |
|
BLAKE2b-256 | 62210cf583251fa73971f537124b9bcdfe0b4473c6e9077a8f7de978739a1c97 |
Close
Hashes for mitol_django_oauth_toolkit_extensions-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d36d32ddeeff4106ef0f84b4517e33d23e94cba25204a5921538d01c7371ef0 |
|
MD5 | db325770da2c4270452b9e8ca5a4a799 |
|
BLAKE2b-256 | de7be909a3d0f6d8367f55ab3c25bb6ecc158931daed3f792c5b61b56c7b7f29 |