'Provides a unique string identifier for the requestor.
This implementation returns the user\'s username.'

def get_identifier(self, request):

    try:
        username = self.extract_credentials(request)[0]
    except ValueError:
        username = u''
    return (username or u'nouser')
