📌  相关文章
📜  错误 401 未经授权的“未提供身份验证凭据.” - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:28.230000             🧑  作者: Mango

代码示例1
#Make sure to have the permissions in your settings.py file like that:

REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
    'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
    'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
),
}