Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

OpenID4Java #108

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 3 comments
Open

OpenID4Java #108

GoogleCodeExporter opened this issue Mar 14, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Version 3.1.4

The trusted-host is sent without a trailing slash which cause rp discovery 
to fail as http://localhost/wordpress is redirected to 
http://localhost/wordpress/ which is not allowed.

I go past this problem by adding a line that has been removed since 2.1.9(my 
last version) to openid_doRedirect ...

if (substr($trust_root, -1, 1) != '/') $trust_root .= '/';

My next problem is that the login fails because claimed_id is null. This is 
my return url...

http://localhost/wordpress/wp-login.php?action=login&janrain_nonce=2009-01-
08T12:02:21Z4Gdq8C&openid1_claimed_id=http://localhost:8080/OpenID/openID/o
4juser&openid_consumer=1&redirect_to=http%253A%252F%252Flocalhost%252Fwordp
ress%252Fwp-
admin%252F&openid.mode=id_res&openid.identity=http://localhost:8080/OpenID/
openID/o4juser&openid.return_to=http://localhost/wordpress/wp-
login.php%3Faction%3Dlogin%26janrain_nonce%3D2009-01-
08T12%253A02%253A21Z4Gdq8C%26openid1_claimed_id%3Dhttp%253A%252F%252Flocalh
ost%253A8080%252FOpenID%252FopenID%252Fo4juser%26openid_consumer%3D1%26redi
rect_to%3Dhttp%25253A%25252F%25252Flocalhost%25252Fwordpress%25252Fwp-
admin%25252F&openid.assoc_handle=1231411061412-
41&openid.signed=return_to,identity,assoc_handle,claimed_id&openid.sig=Hs%2
BlM9Vguq89eBN8X1KL8Je2ru7%2BXYFYi5CiPpg0jmY%3D


I am not sure if the problems is on the wordpress side or on the java side 
yet. 

Any tips would be great.

Cheers,
Stephen



Original issue reported on code.google.com by off...@fluidforms.at on 8 Jan 2009 at 12:45

@GoogleCodeExporter
Copy link
Author

First, the trailing slash issue.  Yes, this was moved deliberately because 
there were some problems where the 
trust root included the trailing slash, but the return_to URL was lacking it.  
I figured the most sure fire way of 
handing this is to make the trust root NOT have the trailing slash, which will 
cover return_to URLs both with 
and without it.  When you say that redirecting from /wordpress to /wordpress/ 
"is not allowed", what are you 
referring to?  There is nothing in the spec that forbids this.  On the 
contrary, OpenID 2.0 says "Relying Parties 
SHOULD use the Yadis protocol to publish their valid return_to URLs."  Part of 
Yadis is following redirects when 
getting the XRDS document.

Regarding your second problem, are you trying to login to WordPress using some 
other OpenID, or are you 
trying to WordPress as your OpenID for logging in somewhere else?  Where does 
OpenID4Java fit in all this?  I 
take it you're using OpenID4Java for the other party (either provider or 
consumer)?  Does the WordPress 
plugin work when you try different [providers/consumers] ?

Original comment by wnorris on 8 Jan 2009 at 7:31

  • Added labels: Type-Defect, Project-WpOpenID

@GoogleCodeExporter
Copy link
Author

Sorry for not being clear enough.

I am using OpenID4Java for my OpenID provider.

I am trying to login with an id from this openid4java provider. I can login 
with a 
wordpress provided openID like [user].wordpress.com.

I got it to work by changing _createCheckAuthRequest in Consumer.php; however, 
I am 
not sure which side effects I am likely to encounter by doing this.

    function _createCheckAuthRequest($message)
    {
        $signed = $message->getArg(Auth_OpenID_OPENID_NS, 'signed');

        if ($signed) {
            foreach (explode(',', $signed) as $k) {
                $value = $message->getAliasedArg($k);
                if ($value === null) {
                    //hack to get it working return null;
                }



Original comment by who.is.s...@gmail.com on 9 Jan 2009 at 1:55

@GoogleCodeExporter
Copy link
Author

i like this

Original comment by ravihaji...@gmail.com on 29 Nov 2013 at 11:10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant