GWT并存储会话密钥 [英] GWT and storing a session key

查看:95
本文介绍了GWT并存储会话密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用登录到外部服务&需要存储sessionKey(sessionKey需要被添加到HTTP头,以便将来的RPC调用)。

My app logs into an external service & needs to store the sessionKey (the sessionKey needs to be added to the HTTP header for future RPC calls).

我有什么选择来存储sessionKey?
我已经读过关于sessionKey被保存到页面上的DIV标记的场景。

What alternatives do I have for storing the sessionKey ? I've read about a scenario where the sessionKey is saved into a DIV tag on the page.

推荐答案

没有必要为客户端提供这些信息。会话管理对客户端应该是透明的。

There is no need for the client side to have this information. Session management should be transparent to the client side.

唯一可接受的方式是在服务器端使用cookie并进行管理。从技术上讲,你可以将这些数据放在客户端的某个地方,但cookies恰恰是它的地方。

The only acceptable way is to use cookies and manage this on the server side. Technically, you can throw this data on the client-side somewhere, but cookies is exactly the place for it.

这篇关于GWT并存储会话密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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