views:

48

answers:

1

I just added OpenID to my website using the PHP janrain libraries, and I got everything working but I have a question about how to do something.

After receiving the openid_url from the user, I pass it to the openid lib, which then processes the url and gets it ready to send to the OP. How can I retrieve that URL?

Why I ask is because my script currently sees http://mysite.com and mysite.com as different URLs. I know the library normalizes the URL, I just don't know how to extract it.

I hope I made sense, and thank you for helping.

+1  A: 

You get the final URL you want to use for tracking purposes back with a Auth_OpenID_SuccessResponse object, in the claimed_id attribute. (The getDisplayIdentifier() method outputs a version more intended for human consumption, which may or may not be different.)

chaos
Awesome, this information helped me a lot.For anybody else who wants more details:=== AFTER ===if ($response->status == Auth_OpenID_SUCCESS){== INSERT THIS ==$openid = $response->getDisplayIdentifier();and then $openid is the corrected url. Tested to work great so far.Thanks Chaos!
Ninjaz