Determine the user associated with a request, using Token Authentication.

def resolve(self, authorization: http.Header):
        """
        Determine the user associated with a request, using Token Authentication.
        """
        from django_apistar.authentication.models import Token

        if authorization is None:
            return None

        scheme, token = authorization.split()
        if scheme.lower() != 'bearer':
            return None

        try:
            user = Token.objects.get(key=token).user
        except Token.DoesNotExist:
            return None

        return user