oauth - AOL openid网站验证

标签 oauth openid aol xrds

我正在尝试使用 AOL openid,却收到“AOL 无法验证此网站”

谁能告诉我避免这个错误的步骤,我应该在这边做什么。

如果有一些示例代码,请分享 - 在此先感谢

AOL openid unable to verify website

问候,

纳文


George 谢谢你的回答,但是我在让它工作时遇到问题,我的 xrds 文件如下

<?php
header('Content-type: application/xrds+xml');
$xrdstext = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    $xrdstext =$xrdstext . "<xrds:XRDS";
    $xrdstext =$xrdstext ." xmlns:xrds=\"xri://$xrds\"";
    $xrdstext =$xrdstext ." xmlns:openid=\"http://openid.net/xmlns/1.0\"";
    $xrdstext =$xrdstext ." xmlns=\"xri://$xrd*($v*2.0)\">\n";
    $xrdstext =$xrdstext ."<XRD>\n";
    $xrdstext =$xrdstext ."<Service xmlns=\"xri://$xrd*($v*2.0)\">\n";
    $xrdstext =$xrdstext ."<Type>http://specs.openid.net/auth/2.0/return_to</Type>\n";
    $xrdstext =$xrdstext ."<URI>http://localhost:56709/myproject/socialoauth.aspx</URI>\n";
    $xrdstext =$xrdstext ."</Service>\n";
    $xrdstext =$xrdstext ."</XRD>\n";
    $xrdstext =$xrdstext ."</xrds:XRDS>";
echo $xrdstext;
?>  

我的请求地址是

https://api.screenname.aol.com/auth/openidServer?openid.claimed_id=http://openid.aol.com/navinleon&openid.identity=http://openid.aol.com/navinleon&openid.return_to=http://localhost:56709/myproject/socialoauth.aspx&openid.realm=http://mydomain.com/xrds/&openid.mode=checkid_setup&openid.assoc_handle=f457ae42e94c11e0811b002655277584&openid.ns=http://specs.openid.net/auth/2.0&openid.ns.alias3=http://openid.net/srv/ax/1.0&openid.alias3.if_available=alias5&openid.alias3.required=alias1,alias2,alias3,alias4,alias6,alias7&openid.alias3.mode=fetch_request&openid.alias3.type.alias1=http://axschema.org/namePerson/friendly&openid.alias3.count.alias1=1&openid.alias3.type.alias2=http://axschema.org/namePerson/first&openid.alias3.count.alias2=1&openid.alias3.type.alias3=http://axschema.org/namePerson/last&openid.alias3.count.alias3=1&openid.alias3.type.alias4=http://axschema.org/contact/country/home&openid.alias3.count.alias4=1&openid.alias3.type.alias5=http://axschema.org/pref/language&openid.alias3.count.alias5=1&openid.alias3.type.alias6=http://axschema.org/contact/email&openid.alias3.count.alias6=1&openid.alias3.type.alias7=http://axschema.org/birthDate&openid.alias3.count.alias7=1

我不确定哪里做错了
请帮助...

最佳答案

因此,此错误的原因是 AOL 无法验证依赖方 return_to URL(根据 OpenID 2 规范 [http://openid.net/specs/openid-authentication-2_0.html#rp_discovery]] 的第 13 节)。执行此步骤是为了保护用户免受指定领域与 return_to URL 不匹配的攻击。<​​/p>

要消除此错误,您需要通过指定的领域字符串支持 XRDS 发现。根据屏幕截图,这仅意味着向在本地主机上运行的服务器添加支持。

基本上,对 http://localhost:56709 的 HTTP 请求和 application/xrds+xml 的 Accept HTTP header 应该返回 X-XRDS-Location 的响应 HTTP header ,其值指定 XRDS 文件的位置,或者它可以返回直接XRDS文件。

XRDS 文档应该看起来像这样......

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
  xmlns:xrds="xri://$xrds"
  xmlns:openid="http://openid.net/xmlns/1.0"
  xmlns="xri://$xrd*($v*2.0)">
  <XRD>

  <Service xmlns="xri://$xrd*($v*2.0)">
    <Type>http://specs.openid.net/auth/2.0/return_to</Type>
    <URI>http://localhost:56709/return_to/url/path</URI>
  </Service>

  </XRD>
</xrds:XRDS>

注意:对本地主机的 HTTP 请求将失败,因为无法到达该站点。警告将持续到 XRDS 文档部署到可访问的站点。

关于oauth - AOL openid网站验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7529013/

相关文章:

python - Django + Google 联合登录

aol - AOL 的开发人员 API key 问题

automation - "professional"IM机器人如何避免被踢出线或被锁定?

openid - 你如何让 AOL 的 OpenID 站点验证工作?

api - 通过 Paypal Oauth 检索从用户收到的付款?

python - 使用 Flask-dance 和 Google oauth 获取 'Missing required parameter: refresh_token'

Android 和 Google App 引擎联合登录

google-apps-script - 具有关联服务器的 Google Workspace 插件 : managing OAuth and permissions

ruby-on-rails - 需要有关链接来自不同站点的帐户的建议

openid - http ://schema. openid.net/contact/email 和 http ://axschema. org/contact/email 之间的区别