From: Guto Maia Date: Fri, 7 Oct 2011 19:21:10 +0000 (-0300) Subject: allows the TwitterMixin define the callback_uri, that solves issue #377 X-Git-Tag: v2.2.0~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b904236d770a3517f62a0c3801c95167097461;p=thirdparty%2Ftornado.git allows the TwitterMixin define the callback_uri, that solves issue #377 --- diff --git a/tornado/auth.py b/tornado/auth.py index b9f7f57da..5701bee40 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -451,14 +451,14 @@ class TwitterMixin(OAuthMixin): _OAUTH_NO_CALLBACKS = False - def authenticate_redirect(self): + def authenticate_redirect(self, callback_uri = None): """Just like authorize_redirect(), but auto-redirects if authorized. This is generally the right interface to use if you are using Twitter for single-sign on. """ http = httpclient.AsyncHTTPClient() - http.fetch(self._oauth_request_token_url(), self.async_callback( + http.fetch(self._oauth_request_token_url(callback_uri = callback_uri), self.async_callback( self._on_request_token, self._OAUTH_AUTHENTICATE_URL, None)) def twitter_request(self, path, callback, access_token=None,