MCPcopy Create free account
hub / github.com/EasyIME/PIME / authenticate_redirect

Method authenticate_redirect

python/python3/tornado/auth.py:717–737  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 4

_on_request_tokenMethod · 0.80
get_auth_http_clientMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected