Changes between Version 1 and Version 2 of Ticket #33513
- Timestamp:
- Feb 14, 2022, 9:15:05 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33513 – Description
v1 v2 6 6 If a user is not authenticated I do: 7 7 **raise exceptions.AuthenticationFailed(_('Invalid token.'))** 8 I expect that djano returns a 401. But django returns 403 like if I were in has_permission(). But I am in authenticate() for sure and if therethis exception is raised Django, sholuld return a 401!8 I expect that djano returns a 401. But django returns 403 like if I were in has_permission(). But I am in authenticate() for sure. And if in this methoid this exception is raised Django, sholuld return a 401! 9 9 10 10 My custom auth class inherits from BaseAuthentication: