? openid-admin.diff
Index: openid_provider.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.inc,v
retrieving revision 1.3
diff -u -p -r1.3 openid_provider.inc
--- openid_provider.inc	7 Sep 2008 03:41:22 -0000	1.3
+++ openid_provider.inc	7 Mar 2009 19:27:09 -0000
@@ -99,7 +99,7 @@ function openid_provider_authentication_
   }
   else {
     $identity = $request['openid.identity'];
-    if ($identity != url('user/'. $user->uid, array('absolute' => TRUE))) {
+    if ($identity != url('user/'. $user->uid .'/openidurl', array('absolute' => TRUE))) {
       $response = openid_provider_authentication_error($request['openid.mode']);
       openid_redirect($request['openid.return_to'], $response);
     }
@@ -116,6 +116,10 @@ function openid_provider_authentication_
     'openid.assoc_handle' => $request['openid.assoc_handle']
   );
 
+  if(variable_get('openid_provider_sreg_request', 0)){  
+    $response['openid.sreg.nickname'] = $user->name;
+    $response['openid.sreg.email'] = $user->mail;
+  }
   // Is the RP requesting Immediate or Indirect mode?
   if ($request['openid.mode'] == 'checkid_immediate') {
     // TODO
@@ -361,4 +365,4 @@ function _openid_provider_powmod($base, 
   else if (function_exists('bcpowmod')) {
     return bcpowmod($base, $exp, $mod);
   }
-}
\ No newline at end of file
+}
Index: openid_provider.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.install,v
retrieving revision 1.2
diff -u -p -r1.2 openid_provider.install
--- openid_provider.install	1 Jun 2008 03:21:41 -0000	1.2
+++ openid_provider.install	7 Mar 2009 19:27:09 -0000
@@ -2,32 +2,6 @@
 // $Id: openid_provider.install,v 1.2 2008/06/01 03:21:41 walkah Exp $
 
 /**
- * Implementation of hook_requirements().
- */
-function openid_provider_requirements($phase) {
- $requirements = array();
-  // Ensure translations don't break at install time
-  $t = get_t();
-
-  if ($phase == 'runtime') {
-    if (user_access('access user profiles', drupal_anonymous_user())) {
-      $requirements['openid_provider'] = array(
-        'value' => $t('Enabled')
-      );
-    }
-    else {
-      $requirements['openid_provider'] = array(
-        'value' => $t('Disabled'),
-        'severity' => REQUIREMENT_ERROR,
-        'description' => $t('Openid Provider requires that anonymous users have <a href="@url">access user profile permission</a> to work properly.', array('@url' => url('admin/user/permissions/'. DRUPAL_ANONYMOUS_RID))),
-      );      
-    }
-    $requirements['openid_provider']['title'] = $t('Anon user profile access');
-  }
-  return $requirements;
-}
-
-/**
  * Implementation of hook_install().
  */
 function openid_provider_install() {
Index: openid_provider.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.module,v
retrieving revision 1.3
diff -u -p -r1.3 openid_provider.module
--- openid_provider.module	7 Sep 2008 03:51:58 -0000	1.3
+++ openid_provider.module	7 Mar 2009 19:27:09 -0000
@@ -49,6 +49,16 @@ function openid_provider_menu() {
     'file' => 'openid_provider.pages.inc'
   );
   
+  $items['user/%user/openidurl'] = array(
+    'title' => 'OpenID Page',
+    'page callback' => 'openid_provider_page',
+    'page arguments' => array(1),
+    'description' => 'Menu callback with full access so no forbiddens are given from server requests',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+    'file' => 'openid_provider.pages.inc'
+  );
+
   $items['user/%user/openid_sites'] = array(
     'title' => 'OpenID Sites',
     'page callback' => 'openid_provider_sites',
@@ -71,6 +81,7 @@ function openid_provider_init() {
   // Not all OpenID clients may be smart enough to do XRDS.
   drupal_add_link(array('rel' => 'openid2.provider', 'href' => url('openid/provider', array('absolute' => TRUE))));
   drupal_add_link(array('rel' => 'openid.server', 'href' => url('openid/provider', array('absolute' => TRUE))));
+
 }
 
 function openid_provider_sites_access($account) {
@@ -90,7 +101,7 @@ function openid_provider_user($op, &$edi
       if ($user->uid == $account->uid) {
         $account->content['openid'] = array(
           '#title' => t('OpenID'),
-          '#value' => t('You may login to other OpenID enabled sites using %url', array('%url' => url('user/' . $account->uid, array('absolute' => TRUE)))),
+          '#value' => t('You may login to other OpenID enabled sites using %url', array('%url' => url('user/' . $account->uid . '/openidurl', array('absolute' => TRUE)))),
           '#class' => 'openid',
           '#weight' => 10
         );
@@ -109,7 +120,13 @@ function openid_provider_admin_settings(
     '#title' => t('Associations expire in this many seconds'),
     '#default_value' => variable_get('openid_provider_assoc_expires_in', '3600'),
     '#size' => 10,
-    '#maxlength' => 10);
+    '#maxlength' => 10
+  );
+  $form['openid_provider_sreg_request'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Associate sreg parameters for nickname and email in openID request'),
+    '#default_value' => variable_get('openid_provider_sreg_request', 0),
+  );
   return system_settings_form($form);
 }
 
@@ -131,7 +148,7 @@ function openid_provider_xrds($account =
     'URI' => array(url('openid/provider', array('absolute'=> TRUE))),
   );
   if ($account->uid) {
-    $data['LocalID'] = array(url('user/'. $account->uid, array('absolute' => TRUE)));
+    $data['LocalID'] = array(url('user/'. $account->uid . '/openidurl', array('absolute' => TRUE)));
   }
   
   $xrds['openid_provider'] = array(
Index: openid_provider.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.pages.inc,v
retrieving revision 1.1
diff -u -p -r1.1 openid_provider.pages.inc
--- openid_provider.pages.inc	13 Apr 2008 11:53:04 -0000	1.1
+++ openid_provider.pages.inc	7 Mar 2009 19:27:09 -0000
@@ -35,6 +35,14 @@ function openid_provider_endpoint($reque
 }
 
 /**
+ * Callback page for OpenID Identifier. This page is primarily used for
+ * discovery when someone is logging in from a Relying Party.
+ */
+function openid_provider_page($account) {
+  return t('This is the OpenID page for %user.', array('%user' => $account->name));
+}
+
+/**
  * Menu callback to continue authentication process after user login. This
  * callback is encountered when a user tries to login to an RP but does not yet
  * have a valid local session
