从 Flex 访问浏览器 cookie [英] Accessing browser cookies from Flex

查看:31
本文介绍了从 Flex 访问浏览器 cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为私有 vBulletin 站点构建 Flex 小部件,Flex 小部件需要访问 vBulletin 服务器上的 XML 文件才能显示数据.

I'm building a Flex widget for a private vBulletin site, and the Flex widget needs to access an XML file on the vBulletin server in order to display data.

出于安全原因,XML URL 需要在来自 Flex 的 URL 请求中传递 bbsessionhash cookie 中的值.Flex 小部件将嵌入用户已登录的私人区域,因此 Flex 请求将来自 cookie 来自的同一网站.

For security reasons, the XML URL will need to have the value in the bbsessionhash cookie passed along in the URL request from Flex. The Flex widget will be embedded in the private area that the user has logged into, so the Flex request will be coming from the same website the cookie is from.

有没有办法直接在 Flex 中访问 c​​ookie?我不希望使用 ExternalInterface 从 JavaScript 获取 cookie 数据,因为它可能会变得有点混乱(模板由完全不同的开发团队开发).

Is there any way to access the cookies directly within Flex? I would prefer not to use ExternalInterface to grab the cookie data from JavaScript, as it could get a little messy (the templates are developed by a completely different dev team).

推荐答案

我从来没有试过这个,但是 这个库 可能正好可以解决这个问题.

I have never tried this, but this library might just do the trick.

这篇关于从 Flex 访问浏览器 cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆