diff --git a/archery/settings.py b/archery/settings.py index 053453f1af..c01e6bb1b6 100644 --- a/archery/settings.py +++ b/archery/settings.py @@ -180,8 +180,11 @@ REST_FRAMEWORK = { 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',), - # 授权 - 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework_simplejwt.authentication.JWTAuthentication',), + # 鉴权 + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework_simplejwt.authentication.JWTAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ), # 权限 'DEFAULT_PERMISSION_CLASSES': ('sql_api.permissions.IsInUserWhitelist',), # 限速(anon:未认证用户 user:认证用户)