Revision: 2168
Author: olavmrk
Date: Wed Feb 10 05:03:50 2010
Log: openidProvider: OpenID 2.0 support.
http://code.google.com/p/simplesamlphp/source/detail?r=2168

Modified:
 /trunk/modules/openidProvider/lib/Server.php
 /trunk/modules/openidProvider/templates/user.tpl.php

=======================================
--- /trunk/modules/openidProvider/lib/Server.php        Fri Jan 22 01:14:18 2010
+++ /trunk/modules/openidProvider/lib/Server.php        Wed Feb 10 05:03:50 2010
@@ -80,7 +80,7 @@
                SimpleSAML_Utilities::maskErrors(E_WARNING | E_STRICT);
                try {
                        $store = new 
Auth_OpenID_FileStore($config->getString('filestore'));
-                       $this->server = new Auth_OpenID_Server($store);
+                       $this->server = new Auth_OpenID_Server($store, 
$this->getServerURL());
                } catch (Exception $e) {
                        SimpleSAML_Utilities::popErrorMask();
                        throw $e;
@@ -378,7 +378,9 @@
                }

                $identity = $this->getIdentity();
-               if ($identity !== $request->identity) {
+               assert('$identity !== FALSE'); /* Should always be logged in 
here. */
+
+               if (!$request->idSelect() && $identity !== $request->identity) {
/* The identity in the request doesn't match the one of the logged in user. */ throw new SimpleSAML_Error_Exception('Logged in as different user than the one requested.');
                }
@@ -403,7 +405,7 @@
                }

                /* The user is authenticated, and trusts this site. */
-               $this->sendResponse($request->answer(TRUE));
+               $this->sendResponse($request->answer(TRUE, NULL, $identity));
        }


=======================================
--- /trunk/modules/openidProvider/templates/user.tpl.php Tue Jan 12 03:33:22 2010 +++ /trunk/modules/openidProvider/templates/user.tpl.php Wed Feb 10 05:03:50 2010
@@ -15,8 +15,10 @@
        $title = $this->t('{openidProvider:openidProvider:title_no_user}');
 }

-$serverLink = '<link rel="openid.server" href="' . htmlspecialchars($serverURL) . '" />'; -$delegateLink = '<link rel="openid.delegate" href="' . htmlspecialchars($userIdURL) . '" />'; +$serverLink = '<link rel="openid.server" href="' . htmlspecialchars($serverURL) . '" />' . "\n"; +$serverLink .= '<link rel="openid2.provider" href="' . htmlspecialchars($serverURL) . '" />'; +$delegateLink = '<link rel="openid.delegate" href="' . htmlspecialchars($userIdURL) . '" />' . "\n"; +$delegateLink .= '<link rel="openid2.local_id" href="' . htmlspecialchars($userIdURL) . '" />';

 $this->data['header'] = $title;
 $this->data['head'] = $serverLink;

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.

Reply via email to