Django OAuth Toolkit
I am trying to use oauth2 authentication with the django oauth toolkit. I got the following exception: Failed to import 'oauth2_provider.ext.rest_framework.OAuth2Authentication' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'
My settings.py file looks like this:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'adaccounts',
'corsheaders',
'clients',
'Gen42Backend',
'djcelery',
'oauth2_provider'
)
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'oauth2_provider.ext.rest_framework.OAuth2Authentication',
)
}
+3
source to share