[Rt-commit] r9635 - in rt/branches/3.7-EXPERIMENTAL: . etc html/Callbacks/OpenID/autohandler sbin

jesse at bestpractical.com jesse at bestpractical.com
Sat Nov 10 19:35:57 EST 2007


Author: jesse
Date: Sat Nov 10 19:35:55 2007
New Revision: 9635

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
   rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/Elements/Login/Default
   rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/autohandler/Auth
   rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in

Log:
 r71624 at pinglin:  jesse | 2007-11-10 19:34:47 -0500
  * Backing out the openid support. It works better as a plugin


Modified: rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in	(original)
+++ rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in	Sat Nov 10 19:35:55 2007
@@ -480,15 +480,6 @@
 
 Set($WebExternalAuth , undef);
 
-
-# If $WebOpenIdAuth is enabled, RT will allow OpenID logins. New users who present
-# OpenID Credentials will be created as unprivileged users with their OpenID as their Name.
-# To enable OpenID Support, you need to install LWPx::ParanoidAgent, Cache::FileCache
-# and Net::OpenID::Consumer.
-#
-Set($WebOpenIdAuth, undef);
-
-
 # If $WebFallbackToInternalAuth is undefined, the user is allowed a chance
 # of fallback to the login screen, even if REMOTE_USER failed.
 

Modified: rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/Elements/Login/Default
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/Elements/Login/Default	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/Elements/Login/Default	Sat Nov 10 19:35:55 2007
@@ -1,13 +0,0 @@
-<%init>
-return unless (RT->Config->Get( 'WebOpenIdAuth'));
-</%init>
-<div class="input-row">
-<h3><&|/l&>Login with OpenID</&></h3>
-</div>
-    <span class="label"><&|/l&>OpenID</&>:</span>
-    <span class="input"><input name="openid" /></span>
-</div>
-
-<div class="button-row">
-    <span class="input"><input type="submit" class="button" value="<&|/l&>Login with OpenID</&>" /></span>
-</div>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/autohandler/Auth
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/autohandler/Auth	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Callbacks/OpenID/autohandler/Auth	Sat Nov 10 19:35:55 2007
@@ -1,91 +0,0 @@
-<%INIT>
-return unless (RT->Config->Get( 'WebOpenIdAuth'));
-use Net::OpenID::Consumer;
-use LWPx::ParanoidAgent;
-use Cache::FileCache;
-
-my $openid_url = ref( $ARGS{openid} ) ? $ARGS{openid}->[0] : $ARGS{openid};
-my $user;
-my $check_url;
-
-# Livejournal misencodes responses...
-if ($ARGS{'openid.sig'}) {
-my $sig = $m->cgi_object->param('openid.sig') ||'';
-$sig =~ s/ /+/g;
-$m->cgi_object->param( 'openid.sig' => $sig );
-}
-
-
-my $root_user = RT::User->new($RT::SystemUser);
-my $csr = Net::OpenID::Consumer->new(
-    ua              => LWPx::ParanoidAgent->new,
-    args            => \%ARGS,
-    cache           => Cache::FileCache->new,
-    consumer_secret => $RT::DatabasePassword,
-    required_root => $RT::WebURL,
-);
-
-
-if ($openid_url) {
-    my $claimed_identity = $csr->claimed_identity("$openid_url");
-    $check_url = $claimed_identity->check_url(
-        return_to      => $RT::WebURL,
-        delayed_return => 1,
-        trust_root     => $RT::WebURL,
-    );
-    RT::Interface::Web::Redirect($check_url);
-}
-if ( $ARGS{"openid.mode"} ) {
-    if ( my $setup_url = $csr->user_setup_url ) {
-
-        # redirect/link/popup user to $setup_url
-        RT::Interface::Web::Redirect($setup_url);
-    } elsif ( $csr->user_cancel ) {
-    } elsif ( my $vident = $csr->verified_identity ) {
-        $user = $vident->url;
-    } else {
-        die ( "Error validating identity: " . $csr->err );
-    }
-}
-
-# if the user isn't logged in and we got credentials from OpenID, load them
-if ( ( !$session{'CurrentUser'} ) && ($user) ) {
-
-    # set a global user so we know elsewhere we're using OpenID for auth
-    $session{'OpenID'} = $user;
-
-    # OpenID has verified that the user has control of this e-mail address,
-    # so it's okay to use it to get a valid RT user
-
-    # we've got a valid user, so try to load
-    $session{'CurrentUser'} = RT::CurrentUser->new();
-    $session{'CurrentUser'}->LoadByCols( Name => $user );
-    
-    if ( $session{'CurrentUser'}->id ) {
-        $RT::Logger->info($session{'CurrentUser'}->Name ." logged in with openid"); 
-    } else {
-        my $UserObj = RT::User->new($RT::SystemUser);
-        my ( $id, $msg ) = $UserObj->Create(
-            Name => $user,
-
-            #RealName => $user->{'name'},
-            #EmailAddress => $user->{'email'},
-            Privileged => 0,
-        );
-        $RT::Logger->info($user ." attempted an account creation with OpenID: $msg");
-        if ( $UserObj->id ) {
-
-            # created the user, now load them as the current user
-            $session{'CurrentUser'}->Load( $UserObj->id );
-            $session{'i'}++;
-            # redirect the user to their preference page to add more info
-            RT::Interface::Web::Redirect( $RT::WebURL . '/User/Prefs.html' );
-        } else {
-
-            # we couldn't create the user.  abort abort abort!
-            delete $session{'CurrentUser'};
-            die( loc( "Cannot create user: [_1]", $msg ) );
-        }
-    }
-}
-</%INIT>

Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in	Sat Nov 10 19:35:55 2007
@@ -64,7 +64,6 @@
     'with-SPEEDYCGI',                     'with-MODPERL1',
     'with-MODPERL2',                      'with-DEV',
     'with-STANDALONE',
-    'with-OPENID',
     'download=s',
     'repository=s'
 );
@@ -78,7 +77,6 @@
     'with-MASON' => 1,
     'with-CORE' => 1,
     'with-CLI' => 1,
-    'with-OPENID' => 0,
     'with-MAILGATE' => 1, 
     'with-DEV' => @RT_DEVEL_MODE@, 
     'with-STANDALONE' => @RT_STANDALONE@,
@@ -158,8 +156,7 @@
 	--with-modperl1		Libraries needed to support the modperl 1 handler
 	--with-modperl2		Libraries needed to support the modperl 2 handler
 
-	--with-dev		    Tools needed for RT development
-    --with-openid       Libraries needed to support OpenID logins
+	--with-dev		Tools needed for RT development
 
 You can also specify -v or --verbose to list the status of all dependencies,
 rather than just the missing ones.
@@ -307,16 +304,10 @@
 $deps{'SQLITE'} = [ text_to_hash( << '.') ];
 DBD::SQLite 1.00
 .
-$deps{'OPENID'} = [text_to_hash(<< '.')];
-Net::OpenID::Consumer
-LWPx::ParanoidAgent
-Cache::FileCache
-.
-
 
 if ($args{'download'}) {
 
-    dowoload_mods();
+    download_mods();
 }
 
 


More information about the Rt-commit mailing list