[Bps-public-commit] jifty-plugin-authentication-twitter branch, oauth-1.0a, created. 958853fecd5f179d871bf73b168ab88469d00e08

Shawn Moore sartak at bestpractical.com
Tue Jun 8 16:07:06 EDT 2010


The branch, oauth-1.0a has been created
        at  958853fecd5f179d871bf73b168ab88469d00e08 (commit)

- Log -----------------------------------------------------------------
commit 958853fecd5f179d871bf73b168ab88469d00e08
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jun 8 16:07:49 2010 -0400

    Begin 1.0a support
    
        But Twitter doesn't support it yet, it seems

diff --git a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
index 188b072..c9c9c6b 100644
--- a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
+++ b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
@@ -12,6 +12,8 @@ use Net::OAuth::AccessTokenRequest;
 use Net::OAuth::AccessTokenResponse;
 use HTTP::Request::Common ();
 
+$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
+
 =head1 NAME
 
 Jifty::Plugin::Authentication::Twitter::Dispatcher - dispatcher for Twitter plugin
@@ -24,9 +26,14 @@ All the dispatcher rules jifty needs to support L<Jifty::Authentication::Twitter
 
 on '/twitter/login' => run {
     my ($plugin) = Jifty->find_plugin('Jifty::Plugin::Authentication::Twitter');
+    my $callback = Jifty->web->url(
+        path => '/twitter/callback',
+    );
+
     my $request_token_request = Net::OAuth::RequestTokenRequest->new(
         consumer_key     => $plugin->consumer_key,
         consumer_secret  => $plugin->consumer_secret,
+        callback         => $callback,
         request_method   => 'POST',
         request_url      => 'http://twitter.com/oauth/request_token',
         signature_method => 'HMAC-SHA1',

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list