OpenID的Google和Yahoo实现是否遵守“必需"的要求?属性? [英] Do the Google and Yahoo implementations of OpenID respect the "required" attribute?

查看:100
本文介绍了OpenID的Google和Yahoo实现是否遵守“必需"的要求?属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆