Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mitol_django_oauth_toolkit_extensions-2026.4.2.tar.gz.

File metadata

File hashes

Hashes for mitol_django_oauth_toolkit_extensions-2026.4.2.tar.gz
Algorithm Hash digest
SHA256 ae99641383849d8c329c6cfdb8244b496ec7753c65ab1b3710c987c18079eb92
MD5 7ec86179a80954d667d953d651c3c953
BLAKE2b-256 c3ddb0cbc215c32072256fdaff73850ed1b34ac7519241d64c3b0cac0c840f3e

See more details on using hashes here.

File details

Details for the file mitol_django_oauth_toolkit_extensions-2026.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mitol_django_oauth_toolkit_extensions-2026.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a348786ef4b9bf7f70723f4970120bc8782ef4fa0a29ce426cd412ba8be986b5
MD5 a7e5f01c95f4fc277dc603b16a66f606
BLAKE2b-256 fad22d378ba9515ef7c567f3d5b6cc894df3d68e1975142e1bbc927e372251ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page