Sign an URL with this request's auth token

async def sign_url(self, url, method=HASH):
        """
        Sign an URL with this request's auth token
        """

        token = await self.get_token()

        if method == self.QUERY:
            return patch_qs(url, {
                settings.WEBVIEW_TOKEN_KEY: token,
            })
        elif method == self.HASH:
            hash_id = 5
            p = list(urlparse(url))
            p[hash_id] = quote(token)
            return urlunparse(p)
        else:
            raise ValueError(f'Invalid signing method "{method}"')