开发者

How to implement a login page in a GWT app?

My WebApp needs to authenticate user before allowi开发者_开发百科ng any sort of access. The scenario I'm trying to implement is a login page with username and password fields. Once user hits "send" button, a sign like "Verifing..." should be shown up while an RPC call verifies credentials. In case of success, load the main app screen.

What is the best way to implement that?


Have you looked at this page ?

It describes how to do the following:

  • Create a 'login' page that is based on user/password authentication.
  • Store this data in a secure fashion on your server.
  • Allow users to 'remain logged in' for as long as you want so they don't have to enter their user name and password every time.
  • Make 'auto-complete' features of most modern browsers work with your GWT's login page. Discussion on adding more security with either HTTPS or fancy hashing algorithm.


I'm not sure how well secure your application has to be... but I would suggest leaving that piece of work to spring security.

You could make a regular login.html page which would, upon successful login, redirect user to the "real" gwt app.

Check out this article: http://code.google.com/webtoolkit/articles/security_for_gwt_applications.html


Not tailored directly for GWT (can still integrate with it), this is a great tutorial for implementing a secure login system.

http://drdobbs.com/web-development/231002659

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜