- DRF OpenAPI version: newest
- Python version: 3.6
I try to get a schema documentation for my django-oauth2-toolkit oauth2 authenticated app. DRF Open Api doesn't recognize the oauth2 token authentication but recognizes it as the Basic Django authentication. I need a proper schema.json file
These are my DRF settings:
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
'DEFAULT_AUTHENTICATION_CLASSES': [
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
# 'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning',
'DEFAULT_VERSION': '0.1',
'ALLOWED_VERSIONS': ['0.1'],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 100,
}
What did I do wrong or does DRF Open API just not recognize oauth2? How could I solve this?
I try to get a schema documentation for my django-oauth2-toolkit oauth2 authenticated app. DRF Open Api doesn't recognize the oauth2 token authentication but recognizes it as the Basic Django authentication. I need a proper schema.json file
These are my DRF settings:
What did I do wrong or does DRF Open API just not recognize oauth2? How could I solve this?