Zend Framework 与 google 一起开放 id 扩展
如何在 google 上使用 openid 扩展?我有这样的东西,我已经应用了一些与这里基本相同的补丁: http://ak33m.com /?p=71
无需扩展即可工作吗?
$extensions = new Zend_OpenId_Extension_Sreg(array(
'nickname' => false,
'email' => true,
'fullname' => false
),
null,
'1.1'
);
if ($form->isValid($post)) {
$open_id_adapter = new App_Auth_Adapter_OpenId($post['openid_identifier'],null, null, null, $extensions);
$result = $auth->authenticate($open_id_adapter);
} else {
$open_id_adapter = new App_Auth_Adapter_OpenId(null, null, null, null, $extensions);
$result = $auth->authenticate($open_id_adapter);
}
if ($result->isValid()) {
$this->_helper->flashMessenger->addMessage(array(
'message' => 'U bent ingelogd',
'status' => 'success'
));
}
How to use openid extensions with google? I have something like this, I allready applied some patches which are basically the same as here: http://ak33m.com/?p=71
It does work without extensions?
$extensions = new Zend_OpenId_Extension_Sreg(array(
'nickname' => false,
'email' => true,
'fullname' => false
),
null,
'1.1'
);
if ($form->isValid($post)) {
$open_id_adapter = new App_Auth_Adapter_OpenId($post['openid_identifier'],null, null, null, $extensions);
$result = $auth->authenticate($open_id_adapter);
} else {
$open_id_adapter = new App_Auth_Adapter_OpenId(null, null, null, null, $extensions);
$result = $auth->authenticate($open_id_adapter);
}
if ($result->isValid()) {
$this->_helper->flashMessenger->addMessage(array(
'message' => 'U bent ingelogd',
'status' => 'success'
));
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许看看 示例 ZF 1.11 应用程序<使用 OpenID(包括 google)进行身份验证的 /a> 将阐明如何使其工作(源代码也可用)。
Maybe having a look at an example ZF 1.11 application that uses OpenID (including google) for authentication will clarify how to make it work (source code is also available).