0

Yahoo doesn't work with php-openid

hi
i am trying to implement openid in my site. i use php-openid-2.1.3. as i read before Yahoo support AX . and i use it in php-openid. the page redirect to Yahoo login page and it asks me to if allow my site to access the requested informantion ( here is email address). when i allow and it return to my site no email address is returned. the data field in Auth_OpenID_AX_FetchResponse Object is empty.
it works fine with Google. but with Yahoo.......
i ask my question at many other places,but i hope i find the solution here ,at Yahoo developre network.

thanks for reading.

by
  • h
  • Apr 11, 2010
5 Replies
  • QUOTE (h @ Apr 10 2010, 11:26 PM) <{POST_SNAPBACK}>
    hi
    i am trying to implement openid in my site. i use php-openid-2.1.3. as i read before Yahoo support AX . and i use it in php-openid. the page redirect to Yahoo login page and it asks me to if allow my site to access the requested informantion ( here is email address). when i allow and it return to my site no email address is returned. the data field in Auth_OpenID_AX_FetchResponse Object is empty.
    it works fine with Google. but with Yahoo.......
    i ask my question at many other places,but i hope i find the solution here ,at Yahoo developre network.

    thanks for reading.


    I had the same problem

    check out this link
    http://stackoverflow.com/questions/2616123...work-with-yahoo

    Now you should be able to fetch attributes
    0
  • Hi,

    Can you please send us the complete HTTP request and
    response headers? You can capture them with the Live HTTP
    Headers Firefox addon:
    https://addons.mozilla.org/en-US/firefox/addon/3829

    With that, we can help check from our side where
    it may go wrong.

    Thanks,
    Yu Wang
    Yahoo! Membership Team
    0
  • here is the request:
    http://web2.um.ac.ir/~daliri_ha/request.txt

    here is the response:
    http://web2.um.ac.ir/~daliri_ha/response.txt

    i put print_r($ax) at:
    $ax = new Auth_OpenID_AX_FetchResponse();
    echo '**';print_r($ax);

    and i see the Auth_OpenID_AX_FetchResponse object is printed 2 times for google .at the first time the data field is empty and the 2th have requested data.
    but about yahoo just 1 time is printed with empty data field.
    0
    • h
    • Apr 12, 2010
    **wow it is solved now !!!!!**

    i traced the functions and found the problem.and that is....
    in "try_auth.php" file i used

    "$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',2,1, 'email');"

    for getting the user email from provider. it works fine in Google because Google ignore '2' (count of requested email address) but in Yahoo! it generate [count.email] => 2 for it (in getSignedNS function) and in Yahoo response there is no entry for count.email. it causes to return null in getSignedNS for Yahoo.
    i changed

    "$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',2,1, 'email');"


    to

    "$attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',1,1, 'email');"

    and it works fine now and return whatever i requested from both provider !!!

    lol...
    0
  • Hi,

    Thanks for reporting this. This is a bug in Yahoo! OpenID AX implementation.
    We'll fix it.

    Thanks,
    Yu Wang
    0

Recent Posts

in OpenID General Discussion