[Bps-public-commit] jifty-plugin-authentication-twitter branch, master, updated. 0e21bcaa162b34310d9fd5d2871de4f5a97271da

Shawn Moore sartak at bestpractical.com
Thu Jun 10 15:54:15 EDT 2010


The branch, master has been updated
       via  0e21bcaa162b34310d9fd5d2871de4f5a97271da (commit)
      from  91c03cd38eaa50c8ce129c7ebbc702f8fa459e7d (commit)

Summary of changes:
 .../Twitter/Action/LoginViaTwitter.pm              |   54 --------------------
 .../Plugin/Authentication/Twitter/Dispatcher.pm    |   15 ++----
 2 files changed, 4 insertions(+), 65 deletions(-)
 delete mode 100644 lib/Jifty/Plugin/Authentication/Twitter/Action/LoginViaTwitter.pm

- Log -----------------------------------------------------------------
commit 0e21bcaa162b34310d9fd5d2871de4f5a97271da
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jun 10 15:53:29 2010 -0400

    Get rid of the LoginViaTwitter action
    
        It's too easy for someone to forge an OAuth response by submitting a
        hand-crafted LoginViaTwitter action. And since we're not going to
        use it outside of this dispatcher rule, having it outside this
        dispatcher rule doesn't win us anything.

diff --git a/lib/Jifty/Plugin/Authentication/Twitter/Action/LoginViaTwitter.pm b/lib/Jifty/Plugin/Authentication/Twitter/Action/LoginViaTwitter.pm
deleted file mode 100644
index 1c25f21..0000000
--- a/lib/Jifty/Plugin/Authentication/Twitter/Action/LoginViaTwitter.pm
+++ /dev/null
@@ -1,54 +0,0 @@
-use warnings;
-use strict;
-
-=head1 NAME
-
-Jifty::Plugin::Authentication::Twitter::LoginViaTwitter
-
-=cut
-
-package Jifty::Plugin::Authentication::Twitter::Action::LoginViaTwitter;
-use base qw/Jifty::Action/;
-
-use Jifty::Param::Schema;
-use Jifty::Action schema {
-    param access_token =>
-        is mandatory;
-
-    param access_secret =>
-        is mandatory;
-
-    param user_id =>
-        is mandatory;
-
-    param screen_name =>
-        is mandatory;
-};
-
-=head2 take_action
-
-Logs into the linked account, creating it if it does not already exist.
-
-=cut
-
-sub take_action {
-    my $self = shift;
-
-    return 1;
-}
-
-=head1 SEE ALSO
-
-L<Jifty::Plugin::Authentication::Twitter>
-
-L<Jifty::Action>, L<Jifty::CurrentUser>
-
-=head1 LICENSE
-
-Jifty is Copyright 2005-2010 Best Practical Solutions, LLC.
-Jifty is distributed under the same terms as Perl itself.
-
-=cut
-
-1;
-
diff --git a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
index 17f7930..a61ee4a 100644
--- a/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
+++ b/lib/Jifty/Plugin/Authentication/Twitter/Dispatcher.pm
@@ -98,17 +98,10 @@ on '/twitter/callback' => run {
 
     my $response = Net::OAuth::AccessTokenResponse->from_post_body($res->content);
 
-    my $login = Jifty->web->new_action(
-        class => 'LoginViaTwitter',
-        moniker => 'login_via_twitter',
-        arguments => {
-            access_token  => $response->token,
-            access_secret => $response->token_secret,
-            user_id       => $response->extra_params->{user_id},
-            screen_name   => $response->extra_params->{screen_name},
-        },
-    );
-    $login->run;
+    # access_token  => $response->token,
+    # access_secret => $response->token_secret,
+    # user_id       => $response->extra_params->{user_id},
+    # screen_name   => $response->extra_params->{screen_name},
 };
 
 1;

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



More information about the Bps-public-commit mailing list