fix: JWT认证兼容旧版user_id claim,解决客服后台401
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -165,7 +165,7 @@ AUTH_USER_MODEL = 'yonghu.UserMain'
|
||||
# DRF配置(也非常简单)
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
'utils.jwt_auth.YonghuidJWTAuthentication',
|
||||
),
|
||||
'DEFAULT_PERMISSION_CLASSES': (
|
||||
'rest_framework.permissions.IsAuthenticated',
|
||||
|
||||
Reference in New Issue
Block a user