[Bps-public-commit] jifty-plugin-authentication-twitter branch, master, updated. 69b4f23b50d57c91cb88e617d4ba9ba53b73ace5
Shawn Moore
sartak at bestpractical.com
Fri Jun 4 12:00:30 EDT 2010
The branch, master has been updated
via 69b4f23b50d57c91cb88e617d4ba9ba53b73ace5 (commit)
from fa9de59f2a68c55049b5cd897779702dc13364f2 (commit)
Summary of changes:
.../Plugin/Authentication/Twitter/Dispatcher.pm | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 69b4f23b50d57c91cb88e617d4ba9ba53b73ace5
Author: Shawn M Moore <sartak at gmail.com>
Date: Fri Jun 4 12:00:58 2010 -0400
Redirect manually
Jifty->web->_redirect thinks we're in a region so it takes the wrong
codepath
diff --git a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
index d0d64f1..604b335 100644
--- a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
+++ b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
@@ -69,7 +69,17 @@ on '/twitter/login' => run {
nonce => $$ * rand,
);
- Jifty->web->_redirect($auth_request->to_url('http://twitter.com/oauth/authenticate'));
+ my $url = $auth_request->to_url('http://twitter.com/oauth/authenticate');
+
+ Jifty->handler->buffer->clear;
+ my $web_response = Jifty->web->response;
+ $web_response->header( Location => $url );
+ $web_response->status( 302 );
+
+ # cookie has to be sent or returning from continuations breaks
+ Jifty->web->session->set_cookie;
+
+ Jifty::Dispatcher::_abort();
};
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list