OpenID的Google和Yahoo实现是否遵守“必需"的要求?属性? [英] Do the Google and Yahoo implementations of OpenID respect the "required" attribute?
问题描述
我想使用OpenID(PHP和LightOpenID)来获取以下用户信息:
I would like to use OpenID (PHP and LightOpenID) to get the following user information:
$openid->required = array(
'namePerson',
'namePerson/first',
'namePerson/last',
'contact/email',
'person/guid',
'birthDate/birthYear',
'birthDate/birthMonth',
'birthDate/birthday',
'gender',
);
但是,我发现Yahoo和Google都只返回以下数据:
However, I found that both Yahoo and Google return only the following data:
Array ( [namePerson] => abc [contact/email] => abc@example.com )
我的代码有问题吗?我可以强迫Google和Yahoo返回我想要的所有数据吗?
Is there something wrong with my code? Can I force Google and Yahoo to return all the data I want?
推荐答案
Google和Yahoo OpenID实现都尊重Attribute Exchange中的"required",但不是您要查找的所有属性.这是他们各自的文档,列出了其架构支持的属性.
Google and Yahoo OpenID implementations both respect the "required" in Attribute Exchange, but not all the attributes you're looking for. Here are their respective documentations listing what attributes their schema supports.
https://developers.google.com/accounts/docs/OpenID#Parameters
在发布时,这些是当前受支持的字段 对于Google
At the time of this posting, these are the currently supported fields for Google
- 国家
- 电子邮件
- 名字
- 语言
- 姓氏
- country
- firstname
- language
- lastname
- http://axschema.org/namePerson
- http://axschema.org/contact/email
- http://axschema.org/person/gender
- http://axschema.org/media/image/default
- http://axschema.org/namePerson
- http://axschema.org/contact/email
- http://axschema.org/person/gender
- http://axschema.org/media/image/default
http://developer.yahoo. com/blogs/ydn/yahoo-openid-now-attribute-exchange-7795.html
在发布时,这些是当前受支持的字段 雅虎
At the time of this posting, these are the currently supported fields for Yahoo
这篇关于OpenID的Google和Yahoo实现是否遵守“必需"的要求?属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!