I am new to django. I have a project that mobiles can have interaction with server using a token. In settings.py I have:
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'UPLOADED_FILES_USE_URL': False,
'DEFAULT_PAGINATION_CLASS': None,
'PAGE_SIZE': DEFAULT_PAGE_SIZE, # For views using PageNumberPagination
}
but when using postman I send a request with an invalid token, istead of 401 (unauthorized), 403 (forbidden) is returning. Is there anything special I can do to fix this?
tnx
views.py