问题是基于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