2014-01-27 52 views
0

我正在嘗試爲任何地方(網絡,空氣,移動)編寫一個使用AS3的OAuth庫,它足夠靈活,可用於任何OAuth站點或OAuth附近。 我的示例應用程序我正在寫谷歌認證,我想寫一個使用谷歌驅動器的應用程序。錯誤#未處理的安全性錯誤訪問https://accounts.google.com

目前航空和移動應用程序工作正常,但網頁Flash播放器的應用程序不斷給我這個錯誤:

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://localhost:81/OAuthWebExample.swf cannot load data from https://accounts.google.com/o/oauth2/token. 

(我得到同樣的錯誤時的端口80上的非本地主機域)

我已經看過https://accounts.google.com/crossdomain.xml其中有:

<site-control permitted-cross-domain-policies="by-content-type" /> 

我不知道這意味着什麼......

我很確定可以讓Flash與這些Google API進行對話。我能做些什麼才能使這個工作?

(我對「使用feedburner或類似代理這些調用的」工作循環「感興趣,謝謝)。

回答

0

I have looked at https://accounts.google.com/crossdomain.xml

這是主策略文件,並沒有授權給accounts.google.com域的內容(沒有allow-access-from節點withing),這樣flash播放器閃光securityError

I am not sure what that means...

It means

by-content-type: [HTTP/HTTPS only] Only policy files served with Content-Type: text/x-cross-domain-policy are allowed

因此,它似乎是專爲子域服務和兒童crossdomain.xml文件,所以喲你無法直接從accounts.google.com加載數據。我發現Google OAuth對於閃存Google Oauth crossdomain.xml problem with Flex存在同樣的問題,他們必須使用舊的AuthSub(它使用accounts.googleapis.comcrossdomain.xml)來解決auth問題,並且在過去的兩年中似乎沒有任何變化。