def get_identifier(self, request):

        return getattr(request.user, get_username_field())
Provides a unique string identifier for the requestor.
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/authentication.py/SessionAuthentication.get_identifier