我正在使用 Sencha Connect cookie 会话。它在 Node 中运行良好,但我需要在客户端解析 cookie。Connect 将 s:j: 添加到 cookie 的前面,并在末尾使用点符号 + 生成的密钥。有没有办法防止这种情况或在 JS 中解析它,还是我需要编写自己的解析器?
cookie 值如下所示:
s: j: {
"oauth": {
"token": "xxxxxx",
"token_secret": "xxxxxx",
"results": {
"oauth_callback_confirmed": "true"
},
"access_token": "xxxxx-xxxx",
"access_token_secret": "xxxx"
},
"me": {
"val": "bu-rcizj7u8jm7jzgea",
"refs": {
"bu-rcizj7u8jm7jzgea": {
"id": "bu-rcizj7u8jm7jzgea",
"creation_time": "2012-07-13T16:01:17.159+0000",
"twitter_id": "138031018",
"first_name": "xxx",
"last_name": "xxx",
"email": "xxx@xxx.com",
"permission": {
"can_update": false,
"can_delete": false,
"can_read": false
},
"twitter_screen_name": "xxxx"
}
}
}
}.DdFx96zckmMbWY8wLiFhuGwnofluk3x2WSVBv71LOV8