async def sign_url(self, url, method=HASH):
token = await self.get_token()<EOL>if method == self.QUERY:<EOL><INDENT>return patch_qs(url, {<EOL>settings.WEBVIEW_TOKEN_KEY: token,<EOL>})<EOL><DEDENT>elif method == self.HASH:<EOL><INDENT>hash_id = <NUM_LIT:5><EOL>p = list(urlparse(url))<EOL>p[hash_id] = quote(token)<EOL>return urlunparse(p)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(f'<STR_LIT>')<EOL><DEDENT>
Sign an URL with this request's auth token