Extension talk:OpenID/Archive 1

From mediawiki.org
Jump to navigation Jump to search

There are these discussion pages: (current) discussion page - Archive 200705-201105

Warning Warning: This is page has archived content and is closed. If you want to contribute, please add your comments on the current discussion page.

I removed links to two sites that use the shitty old MW patch. It only works for MW 1.4.x, it's invasive, and it breaks your user database. Don't use it! -- 14:40, 21 February 2007 (UTC)

The mentioned OpenID http://wikitravel.org/en/User:Evan does not seem to work. E.g. jyte.com says "Unable to find your OpenID server" and I could not find any openid related meta data on the page 00:49, 23 February 2007 (UTC)

I don't think there's a good reason for you to be trying to log in to sites with my OpenID. However, I switched all my Wikitravel accounts to use OpenID, so that user page is no longer a valid OpenID. -- wikitravel:User:Evan 00:37, 26 February 2007 (UTC)

I am using Mediawiki 1.9.3. I created the table for OpenID in the database and added the require_once line to LocalSettings.php. I don't see the OpenID login page on SpecialPages. Two questions: 1. I changed $wgMainCacheType=CACHE_NOTHING to CACHE_ANYTHING. Is that okay? 2. Which of the configuration changes are required?

The OpenID login page won't show up in Specialpages. Just go to it directly, Special:OpenID. Eventually you should put a link to that in your MediaWiki:Loginprompt. 1. I don't know, but I think it should. 2. None of them are required, but I think it won't work very well unless you set the trust root correctly. Also, if you deny by default nobody can log into your server, so read the documentation about the Allow/Deny stuff, then set deny-by-default to false. --wikitravel:User:Evan 00:37, 26 February 2007 (UTC)


Possible issue in 1.9: Whenever someone tries to view the page of a non-OpenID user, that page will error out into "Internal_error.html". I can stop this from happening by commenting out the code block in OpenID.php related to providing the X-XRDS header and meta tags.

else {
   $wgOut->addLink(array('rel' => 'openid.server',
         'href' => OpenIDServerUrl()));
   $rt = Title::makeTitle(NS_SPECIAL, 'OpenIDXRDS/'.$user->getName());

OpenID/XRDS Meta tags are not generated for users logged in via external OpenID provider[edit]

I was wondering why can't I use my Userpage to sign in to other OpenID-enabled sites and I realized that Userpage doesn't have the required Meta tags. I started digging and found that OpenID.php has these lines:

$openid = OpenIdGetUserUrl($user);
if (isset($openid) && strlen($openid) != 0) {
	$url = OpenIDToUrl($openid);
	$disp = htmlspecialchars($openid);
	$wgOut->setSubtitle("<span class='subpages'>" .
		"<img src='http://openid.net/login-bg.gif' alt='OpenID' />" .
		"<a href='$url'>$disp</a>" .
} else {
	$wgOut->addLink(array('rel' => 'openid.server',
		'href' => OpenIDServerUrl()));
	$rt = Title::makeTitle(NS_SPECIAL, 'OpenIDXRDS/'.$user->getName());
	$wgOut->addMeta('http:X-XRDS-Location', $rt->getFullURL());
	header('X-XRDS-Location', $rt->getFullURL());

Why is that? It seems to me that you either get a link to your OpenID url or proper meta tags? So, if you've signed up using OpenID you can't use MediaWiki as an OpenID-server anymore? It makes so little sense it almost doesn't make any sense at all to me. -- 19:13, 22 August 2007 (UTC)

Length parameter must be greater than 0[edit]

I've done a small amount of hacking in CryptUtil, but I can't get it to work. /dev/urandom is working, so I don't know what CryptUtil is complaining about.

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /usr/local/src/php-openid-2.0.0-rc2/Auth/OpenID/CryptUtil.php on line 65

Special:Version looks like this:

    * MediaWiki: 1.10.0
    * PHP: 5.2.0-8+etch7 (apache2handler)
    * MySQL: 5.0.37-log 

ConfirmEdit	Simple captcha implementation	Brion Vibber
MicroID (version 0.1)	adds a MicroID to user pages to confirm account with external services	Evan Prodromou
OpenID (version 0.7.0)	lets users login to the wiki with an OpenID and login to other OpenID-aware Web sites with their wiki user account	Evan Prodromou

Guaka 11:48, 18 October 2007 (UTC)

Maybe it's due to the redirect. I tried to log in at http://wiki.foaf-project.org/ with http://guaka.org, which is merely an OpenID delegation to http://guaka.myopenid.com. guaka.org didn't work, myopenid.com worked. Here's the relevant piece of XHTML at guaka.org:
        <link rel="openid.server" href="http://www.myopenid.com/server" />
        <link rel="openid.delegate" href="http://guaka.myopenid.com/" />

Guaka 12:59, 2 November 2007 (UTC)

   $wgOut->addMeta('http:X-XRDS-Location', $rt->getFullURL());
   header('X-XRDS-Location', $rt->getFullURL());

But I'm not familiar with what exactly is causing the error; I do know it wasn't an issue with 1.8.whatever. Since I don't need to provide OpenID server capabilities, I have just commented it out, but I thought I'd put the issue here in case anyone runs into the same problem or knows how to fix it.

-- 22:17, 26 February 2007 (UTC)

I had the same error as this user (I'm running 1.9.3), but I haven't managed to get OpenID working regardless, so I don't know what's going on. Commenting out this block did indeed stop the '500' errors that occurred when I tried to view my own userpage! No problem on user talk pages, or even IP pages I think. pfctdayelise 15:00, 13 April 2007 (UTC)

I think the problem is that the PHP function header() call is invalid. I'm not a PHP programmer, I admit, but I read the manual and it says that the second argument is supposed to be "true" or "false" (or not present). I think the proper invocation of this line is:

 header('X-XRDS-Location: ' . $rt->getFullURL());

I replaced the failing code with that line and it's no longer failing. Admittedly, it's not a great test since I'm having some other issue with the server functionality and I'm not able to do a complete successful login, but it does seem to cure the immediate problem.

To summarise: fix this issue by replacing on the comma on ~line 209 of OpenID.setup.php with a period. i.e. from

header('X-XRDS-Location: ', $rt->getFullURL());


header('X-XRDS-Location: ' . $rt->getFullURL()); 22:22, 13 March 2008 (UTC)

To confirm the above, I have just installed v0.8.2 of OpenID on A MediaWiki v1.11.0 Attempting to view User Pages caused '500' errors and changing the comma to period as detailed above (in line 239 of OpenID.setup.php for me) fixed this. --BrillyuntWebby 17:50, 29 May 2008 (UTC)

Yes! It fixed my MW 1.13.1 with the OpenID extension v0.8.2! *thxalot* (sofar|sokai)

Well, today is 22:30, 14 January 2009 (UTC) and I have just subverted OpenID. I have this same problem, on MediaWiki 1.13.3, however there is no call to header() in OpenID.setup.php (no line 239 either). Where may I correct this problem?
Chlewey 22:30, 14 January 2009 (UTC)
Self answer: line 69 in OpenID.hooks.php
Chlewey 22:34, 14 January 2009 (UTC)
Yes Done Fixed in r49249 ^demon 17:33, 6 April 2009 (UTC)

Fatal error: Class 'Services_Yadis_ManagerLoader' not found in .../pear/php/Auth/OpenID/Consumer.php on line 307[edit]

line 307: $loader = new Services_Yadis_ManagerLoader();

According to this Services_Yadis_ManagerLoader is located in /Services/Yadis/Manager.php (line 199). But this Services_Yadis_ManagerLoader is not defined in my Manager.php, at least.

which version of this package was this extension successfully used with? pfctdayelise 12:15, 15 April 2007 (UTC)

OK evidently installing OpenID and installing Yadis is NOT the same as installing Yadis through OpenID. wtf.
./pear install --alldeps -f http://www.openidenabled.com/resources/downloads/php-openid/pear/Auth_OpenID-1.2.2.tgz

I re-installed OpenID and it seemed to update the files properly. Now I'm back to the errors without any detail whatsoever, yay... :/ --pfctdayelise 12:53, 15 April 2007 (UTC)

Sample settings[edit]

$wgOpenIDConsumerDenyByDefault = false;
$wgTrustRoot = ...;
$wgOpenIDConsumerStoreType = "file";
$wgOpenIDConsumerStorePath = "extensions/OpenID/consumerstore";

the Path variables create a bunch of files under that directory, so don't call them "consumerstore.txt" like I first did. ;)

Some more info about the file vs memc option would be useful... --pfctdayelise 13:55, 16 April 2007 (UTC)

Usernames with slashes[edit]

Signing up via special:userlogin, usernames aren't allowed to have slashes ("/"). It seems OpenIDLogin needs to allow them too. While testing my setup I tried putting in the OpenID URL for the username (which happened to be "getopenid.com/username". And uh, it caused the wiki to break on line 495 in Consumer.php:


So I guess the user suggested names need to be escaped somehow to avoid this. pfctdayelise 14:37, 16 April 2007 (UTC)


This accepts HTML but not wikitext. It should accept wikitext too. pfctdayelise 14:56, 16 April 2007 (UTC)

Fixed at some point - current version on Betawiki: http://translatewiki.net/w/i.php?title=MediaWiki:Openidlogininstructions/en --Sergey Chernyshev 21:46, 27 February 2009 (UTC)

Bad OpenID mode[edit]

I had the OpenID extension running in MW 1.6.5, but since upgrading to 1.9.3 I've been unable to log in. I am redirected to my OpenID provider (in this case myopenid.com) correctly, but I get the message:

This request had a bad OpenID mode. The requested mode was p.Use your browser's back button to return to the requesting site and inform them of this problem.

The debug log does not show anything helpful. Has anybody encountered this before? Anybody know what's up? Thanks for any advise. JacobPappe 18:18, 22 May 2007 (UTC)

Hmm, this seems to have resolved itself. I think some of my OpenID settings had been commented out. JacobPappe 21:01, 22 May 2007 (UTC)