开发者

yahoo's attribute exchange -> blank data is coming

开发者 https://www.devze.com 2022-12-17 00:20 出处:网络
I am trying to build open开发者_StackOverflow中文版id login system for my website. To do this I used JanRain\'s php openid library v 2.1.3.

I am trying to build open开发者_StackOverflow中文版id login system for my website. To do this I used JanRain's php openid library v 2.1.3.

I am also using openid selector to select the openid provider from the list.

I first created the attributes array that I need to fetch from the provider as follows:

$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',2,1, 'email');
$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/first',1,1, 'firstname');
$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/last',1,1, 'lastname');
$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson',1,1, 'fullname');
$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/friendly',1,1, 'username');

$ax = new Auth_OpenID_AX_FetchRequest;

foreach($attribute as $attr)
{
    $ax->add($attr);
}
$auth_request->addExtension($ax);

and in the finish_auth.php file I wrote this to fetch the attributes returned

$ax = new Auth_OpenID_AX_FetchResponse();
$obj = $ax->fromSuccessResponse($response);

Google gives me all the attributes requested but yahoo doesn't (as stated here that yahoo now supports attribute exchange).

Is there any limitation set by yahoo on attribute exchange too. (they give limited websites access to sreg extension of openid). :(

Please help me, I am stuck over here.

Thanks


Problem for Yahoo is solved !!! check out here: php-openID doesn't work with Yahoo

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号