Java – restlet, GWT and sessions

What is the best way to establish a session between restlet Java API and GWT? In my application, the user will log in with user name and password, and return userid if successful authentication It is then stored in a cookie and used for calls to the API This is obviously completely unsafe because someone may just change the user ID and start updating and retrieving another user

Is it also the best way to use userid callback token, which must be included in the API call?

Solution

Token is a good way, and I have seen it in many implementations Typically, this is handed over as a simple parameter for each request Following the restful idea, you can also include credentials in each HTTP request

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>