Converting caffeine to code, shooting pics, and cruising the roads of life.

Feb 20th, 2007  Feb 20th, 2007

The future and OpenID

After talking to a few people in #OpenID on last night, I finally decided I was going to get OpenID working with my own custom database library. The only full featured PHP library I could find was the one produced by JanRain. It’s not that I don’t like the features in the library, but the fact that it’s a PEAR style library, so it requires a few other PEAR libs that I absolutely refuse to use due to bloat, specifically PEAR::DB.

This caused a real issue for me. Function names are extremely different, along with how queries are performed, compared to my mysqli library. Sometime last month I tried to make a PEAR-style wrapper for my class, but for some reason it failed with the library. Well, last night I found the WordPress OpenID plugin. Knowing that WP runs it’s own MySQL class, I downloaded it and studied the wrapper. This allowed me to see what I had been doing wrong and get a system working before school started today.

Once I had it working, I wrote a simple class I call EasyOpenID. This class allows me to minimize the amount of code in JanRain’s consumer example to very few lines of code. I’ve decided I was going to release this library, so I converted it to FileStore, which is the default the library ships with, and packed it up. I am going to release it here to hopefully get some feedback. If the feedback is good, I will probably continue to expand on the class.

I will have a page up for the library later on tomorrow, but for now, download the file located here. This zip file contains the converted consumer example and my class. The class is released under the new BSD license, while the rest of the code is GPL. Please, provide me with any of your thoughts on the library. Even if you don’t use it on a real, live site, please just let me know what you thought.

Talking with the folks in #OpenID also got me invited to be on the first official OpenID podcast recording, no idea if I’ll be involved, but I’m listening. You will be able to obtain the podcast on sometime tomorrow night or on Thursday. I hope all goes well. Hopefully this new podcast will provide a great resource for developers looking to learn and expand on OpenID.

48 Responses to “The future and OpenID”

  1. Dragoniz3r says:

    Cody, you’re a dumb piece of shit ūüėõ
    Really, I don’t think that, I just wanted to give you some traffic ūüėČ

  2. Alex K says:

    Thanks for the hint a question though….

    if I dont have an iPhone connected (for test purposes) what output should I get from running tool?

    I currently get permission denied is this correct?


  3. Tobias says:

    Warning: require_once(Auth/OpenID/Consumer.php) [function.require-once]: failed to open stream: No such file or directory in

    Does anyone know where to get these files? Can’t find them in the zip…and can’t find it in the documentation.

    Or does anyone know an openphp-library with documentation und which is working? :)

  4. Cody Mays says:

    You need to download the the PHP-OpenID library from My class just makes it easier to use.

  5. Kris says:

    I’m having a slight problem, I’m getting directed to my provider, authenticating, then back again but get the following error:
    Fatal error: return_to must be a string; see NEWS file for upgrading notes. in /home/.peony/krisnorthfield/ on line 409

    I’ve tried several things to no avail. Any clues?

  6. Ozmo Camaris says:

    Kris, to correct your issues and the next one you’ll get after you correct that one ūüėČ try this:

    Line 77 REMOVE
    $this->response = $consumer->complete($_GET);
    Line 77 ADD
    $return_to = substr($_GET['openid_return_to'], 0, strpos($_GET['openid_return_to'], "?"));
    $this->response = $consumer->complete($return_to);

    Line 37 REMOVE
    $sreg = $response->extensionResponse('sreg');
    Line 37 ADD
    $sreg = $response->extensionResponse('sreg', true);

    Note: The $return_to line in EasyOpenID.php is one line, but the blog cuts it off, make sure you don’t have a stray carriage return.

  7. tops says:

    in, I get the following error:
    Fatal error: Define Auth_OpenID_RAND_SOURCE as null to continue with an insecure random number generator. in C:\AppServ\www\php-openid\Auth\OpenID\CryptUtil.php on line 52

    and in
    I get the following error:
    Authentication Error.

  8. Rakesh Rawat says:

    Warning: require_once(Auth/OpenID/Consumer.php) [function.require-once]: failed to open stream: No such file or directory in

    Does anyone know where to get these files? Can’t find them in the zip…and can’t find it in the documentation.

    Or does anyone know an openphp-library with documentation und which is working? :)

  9. x-f says:

    Hi, Cody!
    Your PHP class looks much a lot lighter than the JanRain’s original, so I was considering to use it in my project.
    However I ran into a small problem ‚Äď simple registration extension (sreg) doesn’t work.
    In request params there’s this:
    [openid_ext0_optional] => email
    [openid_ns_ext0] =>

    But it should be:
    [openid_sreg_optional] => email
    [openid_ns_sreg] =>

    And I can’t find, where does this “ext0” come from.
    The original /consumer works fine, EasyOpenID not.
    Could you, please, take a look?

  10. Jay Stockman says:

    I get the following error

    Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/vhosts/ on line 8


  11. Robbie says:

    I get the same error as Jay

  12. kelvin says:

    when i add! it stated need url2.0 and for this onl 1.1

  13. colorful nick says:

    Hey there,

    you’re writing that you’ll add the script to the library – meanwhile we can use the direct link to v1.0. Now that this article is quite old, I wonder where the library is, to see if this direct link is outdated or not.

    feel free to answer me via mail, if you find the time. Thanks,

  14. Cody Mays says:

    You are correct, this library is slightly outdated. I have not been keeping it updated unfortunately :/. If someone would like to, feel free to email me.

  15. Laser Cap says:

    The older you get, the more likely it is that you’ll start to experience thinning and hair loss.

    Vitamin B5 is also very much necessary to stop hair fall and then it well also helps the hair
    to grow quickly. Testing blood or saliva usually is done in the morning and evening with
    the normal ranges as noted below.

    my blog … Laser Cap

  16. The beginning of the end came the day Nia’s boyfriend didn’t take up her
    offer of caring for him when he was ill.
    While some causes of hair loss might be associated with how
    you eat and what your physical health is, not all
    of them involve good diet and healthy habits. By observing all the above tips
    when faced with the problem of hair loss Minneapolis citizens should be able to contain avoidable hair breakages.

    Feel free to visit my web blog; Laser Hair Regrowth For Women

  17. A residential treatment center can offer a safe haven for anyone who
    is seeking to bring an end to this abusive and self-destructive habit,
    once and for all. It is not a place where a teenager goes
    because he has problem staying on task or following guidelines.
    The two viruses are very similar in all aspects, except that each type tends to infect these different areas of the body.

  18. Make sure you know how long it requires to recover
    from a plastic surgery process ahead of agreeing to it.
    Treatments for Treacher Collins syndrome commonly require surgery to remove
    the area in which blockage occurs. The American Board of Plastic Surgery, retrieved from website on February 18, 2012.

    Review my website; plastic surgery to look like justin bieber

  19. The researches had made it possible to identify the entire benefits from the moringa oleifera, the wouldn’t be wrong to say this tree as heavens tree which is enriched with the potential of curing countless diseases and additionally without any side affects though the medication of any diseases carry some side affects to cure that particular problem but that’s the quality of moringa that its pure natural product but the problem is awareness but know gradually people are considering it as a extreme bounty of nature and its usage had arisen, in the current era people are subject to face very dreadful diseases which can even not be identified like only it became apparent that person is infected with the cancer but what type is sometimes becomes an issue and it becomes the cause of death, the diabetes is one of the leading problems which many people had been victimized and uses different medicines and still the level of blood sugar stay not in control and its medication is also cost money but the side effects of medications are vital it usually attach stomach and liver and the patient following diabetics medication needs to intake other for stomach or liver which is like a heck of medicines intake and therefore the person also finds everything fade or lifeless and felt that life is just trouble but don’t make yourself dishearten or demoralized because the solution is moringa the wonder of nature, its splendid product nature its not simply a medicine for the cure but it’s a energy booster rather using food supplements which are produced by chemicals the preference to moringa oleifera should be given which is sort of super charger to human body despite of age factors how great is that its usage could even help to heal the poisoning of snake as well, its proved that this very tree leafs carry antioxidants which helps to give strength to the immune system and thus strong immune systems functionality could help to capitalize the healthy and active life, it also helps the patient which are infected of HIV so this tree is not less than a miracle.
    Taking hormones on your own can be dangerous, even if that hormone is
    generally safe. It will also leave you with a natural golden tone that
    last for up to 28 days.

    my blog – hcg weight loss groupon

  20. Of course, they can spider their own Google+
    site, but it has yet to reach universal adoption. Even the most
    capable SEO specialists struggle with this. In the world of Internet, there is no magic formula that
    will guarantee success every time when you introduce New Ideas.

    Feel free to visit my blog post … social Media Marketing positions

  21. While you are boxing up your possessions, try to let everyone know how much you appreciate their help.
    If its taken you 5, 10 or 15 years to get into the condition youre in now, then trust me, a stroll just isnt enough.
    You should ask relatives, colleagues, friends, neighbors or anyone in your surroundings.

    Here is my blog – moving companies in calgary canada

  22. Thanks for finally writing about > The future and OpenID ę /dev/random
    < Loved it!

  23. DHA is a non-toxic sugar substance that has been FDA (Federal
    Drug Administration) approved since 1977. Therefore, there
    is no risk of cancer, skin rash, and many other allergies that you can catch
    by exposing your sensitive skin to the elements. Raspberry Seed
    Oil ‘ This is considered a superior source of moisturizer and contains skin emollients in the form of
    alpha and gamma tocopherols (Vitamin E), high concentrations of Vitamin A, antioxidants and fatty

    My web-site best organic spray tan solutions

  24. I rarely leave responses, but after looking at through a ton of comments on this page The future and OpenID ę /dev/random.
    I do have some questions for you if it’s okay.
    Is it only me or does it seem like some of these remarks come across like they are left by brain dead individuals?
    ūüėõ And, if you are posting on additional sites, I would like to
    follow anything new you have to post. Could you list of all of all your social community sites like
    your twitter feed, Facebook page or linkedin profile?

  25. I don’t even know how I finished up here, but
    I believed this submit was once good. I do not understand who you’re but definitely
    you are going to a well-known blogger when you aren’t already.

  26. Buddy says:

    WOW just what I was lookiing for. Came here by searching for whip lash claim

    Heree is my website; fashion deesigner handbags, Buddy,

  27. Wilhelmina says:

    You can always rely on the internet for research and more information on different types of air purifier.
    Anyway, these cleaners work by trapping the allergens and particles, so that clean air can return to
    the area where it is being used. For example, people
    with a latex allergy often have related food allergies.

  28. dafabet says:

    I pay a visit day-to-day a few blogs and websites to read posts, except this web site
    offers feature based content.

  29. Anastasia says:

    Awesome! Its actually remarkable article,
    I have got much clear idea regarding from this article.

  30. A cellular, telephone is often a telephone device which utilizs high frequency radio
    waves to send out voice and digital messages. With such
    aan incredible product, the Sleek really neds exceptional dersign to complement its exceptional functionality.
    It allows thee transmitted signal being more powerful, raising the
    range and nsuring no message is llst during transmission.

  31. Hi to every one, it’s really a nice for me
    to pay a visit this website, it consists of useful Information.

  32. 1920’s theme parties will always be in style when fringe dresses look sso beautiful on women. You wish too
    ensure a natural environment for that children’s children. How can I feel confident, expresas my style whilst still being fit the

  33. Neil says:

    Hello to every one, the contents existing at this website are in fact awesome for people knowledge,
    well, keep up the nice work fellows.

  34. see post says:

    What’s up, I desire to subscribe for this weebpage to obtain hottest updates, so where can i do it please help out.

    Feel free to vjsit my weblog … see post

  35. L Van Dusen says:

    This piece of writing gives clear idea designed for the new viewers of blogging, that really how to do blogging and site-building.

  36. buat id card says:

    Workers utilize these credit cards to punch as part of and out and also a report iss naturally store for review.
    Some companies need only a fundamental ID card
    a couplle of employees. Because of big domations too Israel, there seemed to bee a statue of her father-in- law
    in Haifa.

  37. Keto Diet says:

    I always spent my half an hour too read this webpage’s articles or reviews every dayy
    long with a cup of coffee.

    my pwge … Keto Diet

  38. It has become known too have established an incomparably comfortable and supportive
    environment providing you wirh loving and professional
    healthcare services for the elderly. Whatever experience you need, whether surf ,mountains or staying amidst
    trendy nightlife, there’s sure to be described aas a Bali villa apartment to suit you.
    You will probably want to genjerate sute that there exists a school nearby perhaps, or access
    for the local jobs market or trannsport network to generate your life just a little easier.

  39. Some individuals are gifted web site cook almost
    anything, while other people simply not have the skill to just prepare cereal
    for breakfast. Cleaning uup with the cooking doesn’t have to be a chore anymore bercause of COOKINA.
    Crockpot copking could be easy, fun and extremely tasty.

  40. There’s definately a great deal to know about this topic.

    I love all of the points you made.

  41. This tunnel boast small raised hills running accross your lawn.
    Literally eating away with the wood and when left untreated causing unfold damage.

    In comparison, tgese bugs live on – amaze here – beds
    as well as on furniture which are not even remotely
    appropriate to spray upon an ongoing basis.

  42. It’s remarkable designed for me to have a site,
    which is good designed for my experience. thanks admin

Leave a Reply