2011-09-23 73 views
2

蔭試圖使用AOL的openid,螺母我越來越「AOL是無法驗證此網站」AOL OpenID的網站驗證

有人可以告訴我的步驟,以避免這個錯誤,我應該怎麼穿上我的結束。

如果有一些示例代碼,請與大家共享 - 在此先感謝

AOL openid unable to verify website

問候,

納文


喬治感謝你回答,但是我有問題讓它工作,我的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; 
?> 

和我的請求URL是

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

我不知道我做錯了
請幫助...

+1

它仍然無法正常工作的原因是AOL服務器無法訪問本地主機服務器以檢索XRDS文檔。 –

回答

6

所以此錯誤的原因是AOL無法驗證Rive Party return_to URL(OpenID 2規範的第13部分[http://openid.net/specs/openid-authentication-2_0.html#rp_discovery]))。執行此步驟是爲了保護用戶免受指定領域與return_to URL不匹配的攻擊。

要擺脫此錯誤,您需要通過指定的域名字符串支持XRDS發現。基於屏幕截圖,這只是將支持添加到在本地主機上運行的服務器。

基本上,使用application/xrds + xml的Accept HTTP頭對http://localhost:56709發出的HTTP請求應返回X-XRDS-Location的響應HTTP頭並指定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文檔部署到可到達的站點。

+0

喬治謝謝你的回答,但是我有問題讓它工作 –

+0

請看下一個答案的細節.. –