def get_identifier(self, request):
        try:
            username = self.extract_credentials(request)[0]
        except ValueError:
            username = ''
        return username or 'nouser'
Provides a unique string identifier for the requestor.
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/authentication.py/BasicAuthentication.get_identifier