ionoff
Results
1
comments of
ionoff
It works ```python from django.contrib.auth.middleware import get_user from django.utils.deprecation import MiddlewareMixin from django.utils.functional import SimpleLazyObject from rest_framework_jwt.authentication import JSONWebTokenAuthentication class JWTAuthenticationMiddleware(MiddlewareMixin): def process_request(self, request): request.user = SimpleLazyObject( lambda: self.__class__.get_jwt_user(request)) @staticmethod...