[Bps-public-commit] r9021 - RT-Authen-OpenID/html/Callbacks/OpenID/autohandler

falcone at bestpractical.com falcone at bestpractical.com
Wed Sep 12 16:22:18 EDT 2007


Author: falcone
Date: Wed Sep 12 16:22:15 2007
New Revision: 9021

Modified:
   RT-Authen-OpenID/html/Callbacks/OpenID/autohandler/Auth

Log:
* try to log what went horribly wrong when openid login fail and
  fall through to a normal failed login

Modified: RT-Authen-OpenID/html/Callbacks/OpenID/autohandler/Auth
==============================================================================
--- RT-Authen-OpenID/html/Callbacks/OpenID/autohandler/Auth	(original)
+++ RT-Authen-OpenID/html/Callbacks/OpenID/autohandler/Auth	Wed Sep 12 16:22:15 2007
@@ -26,13 +26,17 @@
 
 
 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 ( 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);
+    } else {
+        $RT::Logger->error("OpenID login failure for $openid_url code $csr->{last_errcode} error $csr->{last_errlog}");
+        # we should end up skipping the rest now
+    }
 }
 if ( $ARGS{"openid.mode"} ) {
     if ( my $setup_url = $csr->user_setup_url ) {



More information about the Bps-public-commit mailing list