加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

在Flex中工作的Cookie但不在Air中工作

发布时间:2020-12-15 02:13:53 所属栏目:百科 来源:网络整理
导读:我有一个灵活的应用程序,我正在移植,两个应用程序是相同的,除了根标签是WindowedApplication而不是应用程序. 问题是基于cookie /会话的登录适用于浏览器中的flex应用程序,但不适用于air app.阅读文档说明cookie是可用的,默认情况下URLRequest manageCookies
我有一个灵活的应用程序,我正在移植,两个应用程序是相同的,除了根标签是WindowedApplication而不是应用程序.

问题是基于cookie /会话的登录适用于浏览器中的flex应用程序,但不适用于air app.阅读文档说明cookie是可用的,默认情况下URLRequest manageCookies是真的.

那么有谁知道哪些不适用于Air?

************* UPDATE *****************

我进一步调查了,结果发现cookie在Air中运行,并且在登录后用于所有后续请求,但是cookie在关闭应用程序时无法生存,并且用户在重新启动时需要再次登录.

问题2,这是预期的行为吗?如果是这样,我将研究如何在EncrptedLocalStore中存储cookie信息.

************* UPDATE *****************

干杯,

克里斯

解决方法

“AIR picks up cookie settings from the
operating system,and not the browser.
It just happens though that some
browsers also use the operating system
settings / cookies.”

http://help.adobe.com/en_US/air/reference/html/flash/net/URLRequest.html#manageCookies

http://prsync.com/adobe/more-on-sharing-http-cookies-with-air-applications-107386/

I’ve investigated further and it turns
out cookies are working in Air and are
used for all subsequent requests after
the login,but the cookie does not
survive a shutdown of the application
and the user is required to login
again when they restart.

So Question 2,is this expected
behaviour? If so I will look into
storing the cookie info in
EncrptedLocalStore or something.

是的继续使用EncrptedLocalStore.

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/data/EncryptedLocalStore.html

更新

http://blogs.adobe.com/simplicity/2010/08/single-sign-on-and-http-cookies-in-air-applications.html

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读