2014-01-27 53 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问题,并且在过去的两年中似乎没有任何变化。