in userbeacon/jwt_auth_backend.py [0:0]
def authenticate(self, request):
auth_header = request.META.get("HTTP_AUTHORIZATION", None)
if isinstance(auth_header, str) and auth_header.startswith("Bearer "):
try:
user_model = authenticate(request, token=auth_header[7:])
return user_model, "jwt"
except PermissionDenied:
raise AuthenticationFailed
else:
return None #authentication not attempted