]> git.ipfire.org Git - thirdparty/tornado.git/commit
Make the auth*_redirect methods all return Futures.
authorBen Darnell <ben@bendarnell.com>
Sat, 1 Jun 2013 00:45:42 +0000 (20:45 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 1 Jun 2013 00:45:42 +0000 (20:45 -0400)
commitfafa9d3247fe83111b07223e906dbc43c4946595
treea9508a9c2994156da8aac8741b662f3b22b1e9e1
parent783909097484ca8b5f1823c9cd6bafc2c5e11757
Make the auth*_redirect methods all return Futures.

The OAuth 1.0 authorize_redirect is asynchronous, but this is not obvious
since it doesn't take a callback and instead just calls self.finish.
This fails in coroutines because the request will be auto-finished too soon.
Add Future returns to this method, and to all the rest for consistency.

Update docs and add tests for the various styles of login handlers.
tornado/auth.py
tornado/test/auth_test.py