Rest Framework / Knox -> request.user = anonymous user

I am trying to use rest framework and Knox with Django and access user session information as I have done in the past when not using rest.

For example in the file I would normally reference it with:

def myFunction(request):
user = request.user

However, when I do this using rest I get AnonymousUser, rather than the information of the logged user I typically get.


I am in the same situation. Did you find any solution?

I need user id because I am using as a foreign key in a model and I am getting None!.