PHP OpenID consumer working! [was: PHP hackers wanted -- here's a seed]

Phillip Pearson pp at myelin.co.nz
Thu May 26 05:39:24 PDT 2005


> >Here's a little guestbook script, like Mart's, to show it off:
> >
> >	http://dev.myelin.co.nz/openid/guestbook.php
> >
> 
> A little nitpick:
> 
> You're correctly adding on http:// where no scheme is present, but 
> you're missing the step where if there are only two slashes you add one 
> to the end. Logging in as username.livejournal.com sends off 
> http://username.livejournal.com to LiveJournal, which it doesn't treat 
> as one of its own URLs.

Sure - fixed.

One thing it *doesn't* do is use the final URL if it hits redirects
along the way to fetching the page containing the <link rel> element.
So if I enter "www.livejournal.com/~myelin", LJ will come back and
tell me I can't authenticate for ~myelin.  If I can get PHP to tell me
what the *actual* fetched URL was, I can fix this, though.  It looks
like Net::OpenID::Consumer does it properly.

> Other than that, it seems to work just fine. I like all of the debugging 
> information when you log in; much more informative than mine!

It used to dump out *far* too much info about the ASN parsing
process... but now it's down to a "safe level" I think!

Somebody is going to have to take all this code sometime and make some
sort of validator...:)

Cheers,
Phil



More information about the yadis mailing list