? .patch
? files
? mw.patch
? tmp.patch
? sites/all/modules
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.6
diff -u -F^f -r1.6 openid.module
--- modules/openid/openid.module	25 Sep 2007 14:52:55 -0000	1.6
+++ modules/openid/openid.module	9 Oct 2007 21:50:55 -0000
@@ -157,7 +157,18 @@ function openid_begin($claimed_id, $retu
 
   // Now that there is an association created, move on
   // to request authentication from the IdP
-  $identity = (!empty($services[0]['delegate'])) ? $services[0]['delegate'] : $claimed_id;
+  // First check for LocalID. If not found, check for Delegate. Fall
+  // back to $claimed_id if neither is found.
+  if (!empty($services[0]['localid'])) {
+    $identity = $services[0]['localid'];
+  }
+  else if (!empty($services[0]['delegate'])) {
+    $identity = $services[0]['delegate'];
+  }
+  else {
+    $identity = $claimed_id;
+  }
+  
   if (isset($services[0]['types']) && is_array($services[0]['types']) && in_array(OPENID_NS_2_0 .'/server', $services[0]['types'])) {
     $identity = 'http://openid.net/identifier_select/2.0';
   }
Index: modules/openid/xrds.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/xrds.inc,v
retrieving revision 1.1
diff -u -F^f -r1.1 xrds.inc
--- modules/openid/xrds.inc	18 Jun 2007 16:09:39 -0000	1.1
+++ modules/openid/xrds.inc	9 Oct 2007 21:50:55 -0000
@@ -65,6 +65,9 @@ function _xrds_cdata(&$parser, $data) {
     case 'XRDS/XRD/SERVICE/DELEGATE':
       $xrds_current_service['delegate'] = $data;
       break;
+    case 'XRDS/XRD/SERVICE/LOCALID':
+      $xrds_current_service['localid'] = $data;
+      break;
   }
 }
 
