[QUESTION] Newbie in login and navigation

66 views
Skip to first unread message

dcheeky77

unread,
Nov 12, 2012, 6:34:30 AM11/12/12
to google-we...@googlegroups.com
Hello!

I'm starting a simple project in GWT, but I'm a newbie and don't know how to approach this problem in the right way.

My application must have a login page and a main content one, where all views are managed/displayed (it looks like standard GWT). The login page must be different than the other, since it's monitored by a Single-Sign-On application, over which I don't have control (the content page is not monitored by that application).
Information about the logged in user must then be "passed" to the content page, which uses them (together with an authentication token passed by the SSO application) to query external web services.

It seems like a basic problem, but I can't find the proper way of solving it.
  • If I make the login page in GWT, how do I pass data to the next page and how do I even navigate there?
  • I thought of making the login page without GWT, submitting to a servlet
    • I'm not allowed to deploy a different war, so I'd have to make the servlet inside the GWT application, but how can I then call the GWT content page? Passing GET parameters doesn't look appropriate, since I'd have to pass authentication data... Is there any way to share the scopes?

If I haven't explained properly, I'm more than available to explain better, since I'm definitely missing some basic GWT concepts.

Thank you very much in advance!


Thomas Broyer

unread,
Nov 12, 2012, 6:45:53 AM11/12/12
to google-we...@googlegroups.com
Easiest is to use a dynamic host page. The token passed by the SSO is processed on the server-side and the user info (along with a token for the app and/or a session/cookie) is written in a <script> in the page, which is read from the GWT app using either a Dictionary or a JSNI method.
Have a look at the guice-rf-activity archetype in https://github.com/tbroyer/gwt-maven-archetypes. Usage with a SSO shouldn't be much different.
BTW, this is more or less what Google does for all their apps (GMail, Groups, etc.)

dcheeky77

unread,
Nov 12, 2012, 6:50:04 AM11/12/12
to google-we...@googlegroups.com
Thank you very much for your quick reply! I'll definitely have a look!
Thanks again!
Reply all
Reply to author
Forward
0 new messages