WordPress.org

Forums

Unable to use blog address as openid on Blogger, but .../author/Michael works (33 posts)

  1. michaeltyson
    Member
    Posted 6 years ago #

    Hiya!

    I just installed OpenID on my single-user WordPress blog at http://michael.tyson.id.au and set my account as the blog owner, hoping to use http://michael.tyson.id.au as my OpenID identity.

    I tested it at http://openidenabled.com/resources/openid-test/checkup and it passed.

    However, trying it at a Blogger test page - https://www.blogger.com/comment.g?blogID=1504961872775281277&postID=1449318644434822126 - I receive an error "Incorrect OpenID url"

    On a whim, I tried http://michael.tyson.id.au/author/Michael and it worked perfectly.

    Any ideas? Status info below.

    Status information: All Systems Nominal (Toggle More/Less)

    [INFO] PHP version: 5.2.0
    [INFO] PHP memory limit
    [INFO] Include Path:
    /backup/home/tysonid/public_html/michael/wp-admin
    /usr/lib/php
    /usr/local/lib/php
    [INFO] WordPress version: 2.6.3
    [INFO] PHP OpenID Library Version: 2.1.2
    [INFO] MySQL version: 4.1.21
    [INFO] WordPress' table prefix: wp_
    [OK] Curl Support: Version 7.12.1. SSL: OpenSSL/0.9.7a. zlib: 1.2.3. Supports: ftp, gopher, telnet, dict, ldap, http, file, https, ftps.
    [OK] Big Integer support: BCMath is installed (though GMP is preferred).
    [INFO] Plugin Revision: 518
    [INFO] Plugin Database Revision: 24426
    [INFO] XRDS-Simple: XRDS-Simple plugin is installed.
    [OK] Overall Plugin Status

  2. michaeltyson
    Member
    Posted 6 years ago #

    I also noticed the xrds seems to have the /author/Michael url as the ID, which isn't what I want - I want to use my blog URL as the ID; I don't want to advertise the /author/Michael address as mine is a single user blog.

    Can I change this?

    <!-- OpenID Provider Service (0) -->
    		<Service priority="0">
    			<Type>http://specs.openid.net/auth/2.0/signon</Type>
    			<URI>http://michael.tyson.id.au/?openid_server=1</URI>
    			<LocalID>http://michael.tyson.id.au/author/Michael/</LocalID>
    		</Service>
  3. michaeltyson
    Member
    Posted 6 years ago #

    Answering my own question (the auxiliary question, not my main problem). This fixes the identity thing, so that it uses the blog URL instead of the author URL for the owner.

    Still busted at blogger.com, though.

    --- ../Downloads/openid/server.php	2008-10-27 19:07:18.000000000 +1100
    +++ server.php	2008-11-03 20:50:56.000000000 +1100
    @@ -57,12 +57,12 @@
     				0 => array(
     					'Type' => array(array('content' => 'http://specs.openid.net/auth/2.0/signon')),
     					'URI' => trailingslashit(get_option('siteurl')) . '?openid_server=1',
    -					'LocalID' => get_author_posts_url($user->ID),
    +					'LocalID' => openid_server_user_url($user)
     				),
     				1 => array(
     					'Type' => array(array('content' => 'http://openid.net/signon/1.1')),
     					'URI' => trailingslashit(get_option('siteurl')) . '?openid_server=1',
    -					'openid:Delegate' => get_author_posts_url($user->ID),
    +					'openid:Delegate' => openid_server_user_url($user)
     				),
     			);
     		}
    @@ -112,6 +112,21 @@
    
     /**
    + * Obtain the user URL
    + *
    + * @param user The user object, as returned by openid_server_requested_user(), etc
    + * @return The URL of the user - either the author URL, or the blog URL if the user is the blog owner
    + */
    +function openid_server_user_url($user) {
    +	if ( $user->user_login == get_option('openid_blog_owner') ) {
    +		return get_bloginfo('url');
    +	} else {
    +		return get_author_posts_url($user->ID);
    +	}
    +}
    +
    +
    +/**
      * Process an OpenID Server request.
      *
      * @uses apply_filters() Calls 'openid_server_auth_response' before sending the authentication response.
    @@ -166,7 +181,7 @@
    
     	// get some user data
     	$user = wp_get_current_user();
    -	$author_url = get_author_posts_url($user->ID);
    +	$author_url = openid_server_user_url($user);
     	$id_select = ($request->identity == 'http://specs.openid.net/auth/2.0/identifier_select');
    
     	// bail if user does not have access to OpenID provider
    @@ -254,7 +269,7 @@
     	$user = wp_get_current_user();
     	if (!$user) return false;
    
    -	$identifier = get_author_posts_url($user->ID);
    +	$identifier = openid_server_user_url($user);
     	return ($claimed == $identifier);
     }
    
    @@ -338,7 +353,7 @@
     			}
     		} else  {
     			$server = trailingslashit(get_option('siteurl')) . '?openid_server=1';
    -			$identifier = get_author_posts_url($user->ID);
    +			$identifier = openid_server_user_url($user);
    
     			echo '
     			<link rel="openid2.provider" href="'.$server.'" />
  4. Will Norris
    Member
    Posted 6 years ago #

    You don't want to do those changes in server.php... it's supposed to list your author URL when you're the blog owner (it's delegating to your personal OpenID URL). You'll notice that when you set no blog owner, it lists something different in the XRDS document.

    I can't seem to replicate the problem you had on blogger... I just left a comment on the same post without any problem, using the same configuration with the OpenID plugin. Were you getting that error message on WordPress or Blogger?

  5. michaeltyson
    Member
    Posted 6 years ago #

    Hi!

    Thanks for the reply =)

    Hmm.. I may very well be missing a fundamental point here. Does a 'provider' like this WP plugin provide the OpenID, or do I need to sign up for one at myopenid.com first, and then specify that somewhere? I was under the impression that my blog now provides my id, and I don't need to use another provider, but perhaps I misunderstood.

    As for the blogger problem - the error was on blogger. So, the steps I took were:

    1. open https://www.blogger.com/comment.g?blogID=1504961872775281277&postID=1449318644434822126
    2. type some text, and fill in the captcha
    3. select 'openid', and enter 'http://michael.tyson.id.au' in the field
    4. click 'publish your comment'

    The blogger page reloads, then just beneath the openid input is an exclamation-mark symbol and "Incorrect OpenID url".

    However, if I enter the author address as the openid, it goes through to my site, where I confirm, then the comment is posted successfully.

    This suggests to me that the WP plugin is definitely providing the OpenID... But with the author URL, which is definitely not what I want (hence my changes to server.php, which didn't actually work at blogger, but worked on the official openID test page)

  6. Jehy
    Member
    Posted 6 years ago #

    Same for me - only works with /author/name, but not with blog url itself.
    Trying to authorisate on livejournal.com
    The error:
    * no_identity_server: The provided URL doesn't declare its OpenID identity server.

  7. Jehy
    Member
    Posted 6 years ago #

    On Blogger, when I try to post with openid "http://jehy.ru/articles/", I see error
    Incorrect OpenID url

  8. Will Norris
    Member
    Posted 6 years ago #

    @Michael: that is definitely odd. This may not make a difference, but it's worth a shot.... go to your WP options page here. Find the three options that start with "openid_xrds_" and change all of their values to 0 (the number zero). That will just cause the plugin to include less stuff in your XRDS document which certain OpenID libraries sometimes choke on. Then try commenting on Blogger and let me know if that causes any change.

    @Jehy: For some reason the plugin isn't actually advertising the OpenID authentication services on your "/articles/". I'll have to look into that.

  9. michaeltyson
    Member
    Posted 6 years ago #

    Damn, nope, Blogger is still reporting 'Incorrect OpenID url' after changing and saving those values.

    So, Blogger works for you? It seems odd that the OpenID test suite passes my OpenID, but Blogger fails on it.

  10. Jehy
    Member
    Posted 6 years ago #

    Thank you, wnorris, please do.
    Yeah, I just tried deactivating all other plugins - it didn'r help so it's not a conflict.
    OPENID test reports all ok...

  11. Jehy
    Member
    Posted 6 years ago #

    Hm. I played with wordpress and after a little blogger began to authorise me...
    I did't do anything specially for OPENID...
    So it's not plugin's or server's problem - seems like the reason is some kind of shifting of internal wordpress settings.

  12. Will Norris
    Member
    Posted 6 years ago #

    @Jehy: that's very strange, but good that it's fixed. If you ever figure out exactly what fixed it, please let us all know.

  13. Jehy
    Member
    Posted 6 years ago #

    Same problem again.
    I have wordpress 2.6.5 and I don't know what caused this bug to appear again. It really annoyed me because I couldn't use my openid accounts anymore.
    However, server doesn't declare rel links to openid server, but actually works.

    Adding openid rel links really helped me.
    Here's a mini-plugin for quick fix: http://jehy.ru/articles/2008/12/14/wordpress-openid-plugin-fix/

    I hope you could discover and fix this bug soon.

  14. Jehy
    Member
    Posted 6 years ago #

    P.S. Anyway, guys, thanks for great work.
    Will you add optional openid settings (name,avatar, birth date and other) to wordpress openid account? It would be nice.

  15. buddha trance
    Member
    Posted 6 years ago #

    If you only need that plugin to use your own URL as your opedID, the very simple method I found is to sign up with myOpenID, create a persona in your profile (name and website displayed). Then in header.php of your theme, within the <head></head> tags just add:

    <link rel="openid.server"
            href="http://www.myopenid.com/server" />
      <link rel="openid.delegate"
            href="http://youraccount.myopenid.com/" />
      <link rel="openid2.local_id"
            href="http://youraccount.myopenid.com" />
      <link rel="openid2.provider"
            href="http://www.myopenid.com/server" />
      <meta http-equiv="X-XRDS-Location"
            content="http://www.myopenid.com/xrds?username=youraccount.myopenid.com" />

    putting your username in "youraccount".

    It works perfectly. Tested while leaving comments on Blogger.

    Easy, and no plugins.

  16. Jehy
    Member
    Posted 6 years ago #

    You misunderstood the situation - this plugin is a fix for openid plugin. Please, at least watch tags careful.
    Code you posted here won't do any good to people with this problem with openid plugin.

    OFFTOPIC

    By the way - it's absolutely incorrect to write openid declaration to theme file - it's almost same as modifying core files. Do you want your openid to disappear when you change theme?
    If you want to the declaration of your own openid server, you can use mini-plugin like this:

    <?
    /*
    Plugin Name: openid-rel
    Plugin URI: http://jehy.ru/articles/2008/12/14/wordpress-openid-plugin-fix
    Description: Mini plugin for displaying of fucken openid rel link
    Version: 0.01
    Author: Jehy
    Author URI: http://jehy.ru*/
    
    function add_openid_rel()
    {?>
    <link rel="openid.server"
            href="http://www.myopenid.com/server" />
      <link rel="openid.delegate"
            href="http://youraccount.myopenid.com/" />
      <link rel="openid2.local_id"
            href="http://youraccount.myopenid.com" />
      <link rel="openid2.provider"
            href="http://www.myopenid.com/server" />
      <meta http-equiv="X-XRDS-Location"
            content="http://www.myopenid.com/xrds?username=youraccount.myopenid.com" />
    <?
    }
    add_action('wp_head', 'add_openid_rel');
    ?>

    It's absolutely the same as your code, but you don't have to write it in your theme file. People have some really strange prejudice about plugins. If you can do smth with plugin, do it with plugin - wordpress hooks system will do you no harm ;)

  17. buddha trance
    Member
    Posted 6 years ago #

    @ Jehy

    Please, at least watch tags careful.

    The tag says openid, and the question was about using openid on Blogger. Openid is not necessarily a plugin (that was not in the tag), but a general issue about the openid approach.

    By the way - it's absolutely incorrect to write openid declaration to theme file

    If you don't like doing that, it's fine, but it's not "absolutely" incorrect. So much, that it works, and a lot of people have done it. There is plenty of reference about this method, if you search on Google.

    I mentioned this option for people who don't want to use any plugins, or go crazy trying to fix them, and they should be able to learn about this method. So they can make a choice, according to their needs.

    You want the plugin? Great. Someone else doesn't? Great.

  18. Jehy
    Member
    Posted 6 years ago #

    "openid" matches the plugin's name, there's no other way to link topic to that plugin.
    From the first message in topic it were obvious that here's the discussion of particular plugin, not about openid on blogger.

    lot of people have done it. There is plenty of reference about this method, if you search on Google

    Yeah. People also modify core files, use plugins to enable php code in comments and so on. PEOPLE in common are really stupid creatures. Don't ever think about doing something "as everybody does", do it as it should be. I am really ashamed to tell simple things like this.

  19. buddha trance
    Member
    Posted 6 years ago #

    You sound like someone stepped on your private territory... in an open forum.... hmmmm.....

    I'm not wasting time on this any longer. Done.

  20. Will Norris
    Member
    Posted 6 years ago #

    @Jehy: It definitely seems like the OpenID plugin isn't working quite right. It may be something we have to play with a bit to figure out, so let me know if you wouldn't mind getting on Jabber/AIM/other to try and figure this out. Also let me know what time is good for you, given that you seem to be on the other side of the world :) Feel free to contact me by email: http://willnorris.com/#diso-profile

    There is another plugin which adds additional profile attributes. If present, it will hook into the OpenID plugin as well to provide them via SREG. It's not in the WordPress.org plugin directory yet, but you can check it out of subversion at http://diso.googlecode.com/svn/wordpress/wp-diso-profile/trunk/

  21. Jehy
    Member
    Posted 6 years ago #

    @wnorris: Thanks for consideration, I'll be able to play with it on holidays, then I'll contact you.
    Also thanks for info about additional openid profile fields plugin, that's great.

  22. michaeltyson
    Member
    Posted 6 years ago #

    Hello - just bumping this issue. I put OpenID on hold for a while, but I've just updated to 3.2.1 and thought I'd give it another shot.

    Unfortunately the same issue exists - if I try to use my blog URL, "http://michael.tyson.id.au/", as an OpenID at Blogger, it causes the same ol' error ("Incorrect OpenID url")

    Any thoughts?

    Cheers =)

    [INFO] PHP version: 5.2.8
    [INFO] PHP memory limit: 32M
    [INFO] Include Path:
    /home/tysonid/public_html/michael/wp-admin
    /usr/lib/php
    /usr/local/lib/php
    [INFO] WordPress version: 2.7.1
    [INFO] PHP OpenID Library Version: 2.1.2
    [INFO] MySQL version: 5.0.67
    [INFO] WordPress' table prefix: wp_
    [OK] Curl Support: Version 7.19.3. SSL: OpenSSL/0.9.7a. zlib: 1.2.3. Supports: tftp, ftp, telnet, dict, ldap, http, file, https, ftps.
    [OK] Big Integer support: BCMath is installed (though GMP is preferred).
    [INFO] Plugin Revision: 519
    [INFO] Plugin Database Revision: 24426
    [INFO] XRDS-Simple: XRDS-Simple plugin is installed.
    [OK] Overall Plugin Status

  23. Jehy
    Member
    Posted 6 years ago #

    Try this.

  24. michaeltyson
    Member
    Posted 6 years ago #

    Oh man, very nice work Jehy - that was it!

  25. Jehy
    Member
    Posted 6 years ago #

    I hope the authors of plugin will also notice and fix it...
    Seems like that function works randomly - I mean, depending on the system settings :)

  26. Will Norris
    Member
    Posted 6 years ago #

    so, the real problem is not with the plugin, it's with WordPress. is_front_page() relies on an option named 'show_on_front' that is not always set. I've updated the plugin to set this option if it is empty, so that is_front_page() will work as it should. This will be in the next release.

    If you want to fix it in the short term....

    1. make sure you have at least one post and one page on your blog. They can be empty, it doesn't matter, but you must have one of each.
    2. Go to the "Reading" settings page
    3. Make sure "Front page display" is set to whatever you want (your latest posts, or a static page)
    4. Click "Save Changes", even if you didn't actually change anything
    5. Everything should work now, and you can remove any posts or pages you added in the first step
  27. zaneselvans
    Member
    Posted 6 years ago #

    I'm also having problems with wp-openid and Blogger at http://amateurearthling.org/ using wp-openid 3.2.1 on WP 2.7.1. I've got delegation set up from http://zaneselvans.org and it works on plenty of other sites... not Blogger though - when I try to use OpenID there, it sends me to http://amateurearthling.org/?(OpenID query string) and doesn't actually do any of the authentication stuff.

  28. Will Norris
    Member
    Posted 6 years ago #

    So it looks like you setup the OpenID delegation stuff on zaneselvans.org with a previous version of the plugin, and recently upgraded. I can tell b/c of the OpenID server URL you have on there:
    <link rel="openid2.provider" href="http://amateurearthling.org/?openid_server=1" />

    If you take a look at what you have on amateurearthling.org, you'll notice this has been changed to:

    <link rel="openid2.provider" href="http://amateurearthling.org/openid/server" />

    The delegate URL should also be changed to be your author URL, not the root blog URL. Basically, just copy the exact OpenID delegation stuff you have on amateurearthling.org, and put that on zaneselvans.org:

    <link rel="openid2.provider" href="http://amateurearthling.org/openid/server" />
    <link rel="openid2.local_id" href="http://amateurearthling.org/author/zane/" />
    <link rel="openid.server" href="http://amateurearthling.org/openid/server" />
    <link rel="openid.delegate" href="http://amateurearthling.org/author/zane/" />
  29. zaneselvans
    Member
    Posted 6 years ago #

    Sweet! That fixed it.

  30. oberazzi
    Member
    Posted 6 years ago #

    I am having a similar problem. I get the following error message:

    Fatal error: Call to a member function needsSigning() on a non-object in /home/timobrien/timobrienphotos.com/wp-content/plugins/openid/Auth/OpenID/Server.php on line 1495

    any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Topic