Symfony是否有一个OpenID 2.0插件? [英] Is there an OpenID 2.0 plugin for Symfony?
问题描述
我正在使用Symfony的sfOpenID插件,该插件不支持OpenID 2.0.例如,这意味着使用Yahoo!的人. OpenID无法登录到我的网站.
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.
有一个可以与sfGuard一起使用的OpenID 2.0插件,但是我既不使用也不打算使用sfGuard.另外,它还需要安装Zend框架,在我的情况下这是一个过大的选择.
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:
- Symfony是否有另一个支持OpenID 2.0的OpenID插件?
- 使sfOpenID支持OpenID 2.0会需要什么技巧?
我想我可以学习OpenID规范并自己破解,但是,我是一个懒惰的程序员:)
I suppose I could study OpenID specs and hack it myself, but then, I am a lazy programmer :)
推荐答案
我认为您已经为Symfony的插件使用sfOpenID和taOpenIDsfGuardPlugin覆盖了所有选项.
I think you've covered all your options with sfOpenID and taOpenIDsfGuardPlugin for Symfony's plugins.
但是,如果不详细研究OpenID的规范,则可以尝试使用其中一种PHP库( http://wiki.openid .net/Libraries ),方法是将其放入您的lib中并连接到sfUser
或用于身份验证的任何内容.还有一个OpenID Enabled库( http://openidenabled.com/php-openid/)如果您将错误报告级别调整为,则仍会使用PHP4,尽管与PHP5兼容.排除一些警告.
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.
有一些教程介绍了如何使用PHP在您的网站上启用OpenID: http://www.saeven.net/openid.htm 或 http://www.plaxo.com/api/openid_recipe .
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.
更好的是,利用这些知识来然后用它制作一个sfPlugin .
And better yet, use this knowledge to make a sfPlugin out of it afterwards.
这篇关于Symfony是否有一个OpenID 2.0插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!