简体   繁体   English

在Adobe Air + Flex中使用Janrain Engage(RPX)吗?

[英]Using Janrain Engage (RPX) in Adobe Air + Flex?

I have a website using Janrain for the Log-In and I also have a desktop application (Adobe Air) that require login with the website, but I can't get it work. 我有一个使用Janrain进行登录的网站,也有一个需要登录该网站的桌面应用程序(Adobe Air),但无法正常工作。

My idea was to use mx:HTML container and navigate to the Janrain login system so the user can log-in, set a Token in the session and retrieve that token for further communications. 我的想法是使用mx:HTML容器并导航到Janrain登录系统,以便用户可以登录,在会话中设置令牌并检索该令牌以进行进一步的通信。

<mx:HTML x="369" y="189" location="http://www.mysite.com/auth/clientLogin.php" 
verticalScrollPolicy="on" horizontalScrollPolicy="on" width="341" height="162"/>

I can see the Janrain provider selector with my providers but when I click on "Facebook" for example, it give me errors: 我可以与提供者一起看到Janrain提供者选择器,但是例如,当我单击“ Facebook”时,它给了我错误:

TypeError: Result of expression 'aF.window' [undefined] is not an object.
at https://s3.amazonaws.com/static.rpxnow.com/js/lib/rpx.js : 1

Any Idea on how I can use my Janrain Engage log-in system in Adobe Air + Flex? 关于如何在Adobe Air + Flex中使用Janrain Engage登录系统有任何想法吗?

I figured it out!!! 我想到了!!!

It seems that the default HTMLHost used by the HTML container do not support some javascript functions. 似乎HTML容器使用的默认HTMLHost不支持某些javascript函数。 The solution is to implement a custom HTMLHost or, the fastest way do the following: 解决方案是实现自定义HTMLHost,或者以最快的方式执行以下操作:

html.htmlHost = new HTMLHost(true);

Where html is my mx:HTML object binded in ActionScript. html是我在ActionScript中绑定的mx:HTML对象。 I found the solution after searching for hours and found this page: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e74.html 我在搜索了几个小时后找到了解决方案,并找到了以下页面: http : //help.adobe.com/zh_CN/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e74.html

I'm using Adobe Air 2.5 but it seems to be the same! 我正在使用Adobe Air 2.5,但似乎是一样的! I hope this will be useful for someone else. 我希望这对其他人有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM