
# DO NOT EDIT THIS FILE -- AUTOGENERATED BY PANTS
# Target: src/mitol/oauth_toolkit_extensions:mitol-django-oauth-toolkit-extensions

from setuptools import setup

setup(**{
    'authors': [
        'MIT Office of Open Learning <mitx-devops@mit.edu>',
    ],
    'classifiers': [
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
    ],
    'description': 'MIT Open Learning django app extensions for oauth toolkit',
    'install_requires': (
        'django-oauth-toolkit>=1.3.3',
        'django>=3.0',
        'factory-boy~=3.2',
        'mitol-django-common',
        'pytz>=2020.4',
        'requests>=2.20.0',
    ),
    'license': 'BSD 3-Clause License',
    'long_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`:

```python
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.
""",
    'long_description_content_type': 'text/markdown',
    'name': 'mitol-django-oauth-toolkit-extensions',
    'namespace_packages': (
        'mitol',
    ),
    'package_data': {
        'mitol.oauth_toolkit_extensions': (
            'CHANGELOG.md',
            'README.md',
            'py.typed',
        ),
    },
    'packages': (
        'mitol',
        'mitol.oauth_toolkit_extensions',
        'mitol.oauth_toolkit_extensions.migrations',
    ),
    'python_requires': '>=3.8',
    'version': '2023.12.19.1',
    'zip_safe': True,
})
