Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an OpenID 2.0 plugin for Symfony?

I am using sfOpenID plugin for Symfony, which doesn't support OpenID 2.0. That means, for example, that people using Yahoo! OpenID can't login to my site.

There is an OpenID 2.0 plugin that works with sfGuard, but I am not using nor planning to use sfGuard. Plus, it requires to install Zend framework, too, which is an overkill in my scenario.

So I've got two questions, really:

  • is there another OpenID plugin for Symfony supporting OpenID 2.0?
  • what would be the hack required to make sfOpenID support OpenID 2.0?

I suppose I could study OpenID specs and hack it myself, but then, I am a lazy programmer :)

like image 382
Tomas Kohl Avatar asked Nov 09 '08 18:11

Tomas Kohl


People also ask

Is OpenID obsolete?

This page lists libraries for OpenID 2.0 – a now obsolete specification. OpenID 2.0 has been superseded by OpenID Connect.

What is OpenID standard?

OpenID is an open standard and decentralized authentication protocol promoted by the non-profit OpenID Foundation.


3 Answers

I think you've covered all your options with sfOpenID and taOpenIDsfGuardPlugin for Symfony's plugins.

Without studying OpenID's specs in detail though, you could try one of those PHP libraries (http://wiki.openid.net/Libraries) by dropping it in your lib and connecting to a sfUser, or whatever you're using for authentication. There is also the OpenID Enabled library (http://openidenabled.com/php-openid/) which still uses PHP4 although compatible with PHP5 if you tweak the error reporting level to exclude some warnings.

There are a few tutorials out there that explains how to enable OpenID on your site with PHP: http://www.saeven.net/openid.htm or http://www.plaxo.com/api/openid_recipe.

And better yet, use this knowledge to make a sfPlugin out of it afterwards.

like image 60
lpfavreau Avatar answered Sep 20 '22 16:09

lpfavreau


There is an easier way. JanRain offers OpenID (and facebook) as a service http://rpxnow.com . Vastly easier/quicker than going native with the libraries.

like image 40
ltd Avatar answered Sep 20 '22 16:09

ltd


i had ( and i'm still having ) the same problem. Firstly there isn't any php5 openid library that is feature complete. The only one was abandoned for the one shipped with Zend Framework.

So you either write your own ( don't recomend , lot of work ), or use the one from Zend ( that is what i Use).

The problem is that it is heavily embeded into Zend and requires lots of ZF stuff.

Maybe i will publish a plugin similar to taOpenIDsfGuardPlugin but for use withouth sfGuard, because it's often asked for ( and i will need it for my future projects ;))

like image 29
deresh Avatar answered Sep 20 '22 16:09

deresh