This commit is contained in:
bniwredyc 2023-07-13 16:53:51 +02:00
parent 2b6496b34d
commit 9e94f75f7e

View File

@ -21,7 +21,7 @@ class JWTAuthenticate(AuthenticationBackend):
) -> Optional[Tuple[AuthCredentials, AuthUser]]:
if SESSION_TOKEN_HEADER not in request.headers:
return AuthCredentials(scopes={}), AuthUser(user_id=None)
return AuthCredentials(scopes={}), AuthUser(user_id=None, username='')
token = request.headers.get(SESSION_TOKEN_HEADER)
if not token: