Just like `~OAuthMixin.authorize_redirect`, but auto-redirects if authorized. This is generally the right interface to use if you are using Twitter for single-sign on. .. versionchanged:: 3.1 Now returns a `.Future` and takes an optional callback, for
(self, callback_uri: Optional[str] = None)
| 715 | _TWITTER_BASE_URL = "https://api.twitter.com/1.1" |
| 716 | |
| 717 | async def authenticate_redirect(self, callback_uri: Optional[str] = None) -> None: |
| 718 | """Just like `~OAuthMixin.authorize_redirect`, but |
| 719 | auto-redirects if authorized. |
| 720 | |
| 721 | This is generally the right interface to use if you are using |
| 722 | Twitter for single-sign on. |
| 723 | |
| 724 | .. versionchanged:: 3.1 |
| 725 | Now returns a `.Future` and takes an optional callback, for |
| 726 | compatibility with `.gen.coroutine`. |
| 727 | |
| 728 | .. versionchanged:: 6.0 |
| 729 | |
| 730 | The ``callback`` argument was removed. Use the returned |
| 731 | awaitable object instead. |
| 732 | """ |
| 733 | http = self.get_auth_http_client() |
| 734 | response = await http.fetch( |
| 735 | self._oauth_request_token_url(callback_uri=callback_uri) |
| 736 | ) |
| 737 | self._on_request_token(self._OAUTH_AUTHENTICATE_URL, None, response) |
| 738 | |
| 739 | async def twitter_request( |
| 740 | self, |
nothing calls this directly
no test coverage detected