我正在将Authorization Grant Type
用作Client-Crendential
。但是当我使用`access_token
http://localhost:8000/api/jobs/list/access_token=yTpq4qbjnp4gTI7Ur7HRiYGIjGteMn`
它给出错误/消息为
{ “ detail”:“您无权执行此操作。” }
Settings.py
OAUTH2_PROVIDER = {
# this is the list of available scopes
'SCOPES': {'read': 'Read scope', 'write': 'Write scope', 'groups': 'Access to your groups'}
}
REST_FRAMEWORK = {
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_AUTHENTICATION_CLASSES': (
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
'rest_framework.authentication.SessionAuthentication', # To keep the Browsable API
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
}
我看不到数据。