Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » strategy for passing in User auth session from main webApp to rap web app
strategy for passing in User auth session from main webApp to rap web app [message #644304] Fri, 10 December 2010 13:21 Go to next message
Tom H is currently offline Tom HFriend
Messages: 139
Registered: July 2009
Senior Member
In my current web application design, our users login to a standard post method with a servlet handling redirection/login/logout etc.

What is the recommended strategy to pass the auth session into the RAP application. ie I want the user to login normally jsp/jsf form, but when they click a link that takes them into the RAP context eg /myRAP?view=view that the RAP app knows who they are.

The auth details are in a database.

I am also working on a RCP app that uses some components from the RAP bundles, however is way off being single source.

However I would be interested in any strategies that allow a common authentication scheme between my RAP app, my RCP app and my general Java dynamic web projects. (should I look at JAAS or OSGi services or something like that?)

Many Thanks,
T

[Updated on: Fri, 10 December 2010 13:22]

Report message to a moderator

Re: strategy for passing in User auth session from main webApp to rap web app [message #644459 is a reply to message #644304] Sat, 11 December 2010 16:57 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

you can access the HttpServletRequest using RWT.getRequest(). You'll
probably need to call methods like getUserPrincipal() or isUserInRole()
from the request thread, see RWT.requestThreadExec(). Alternatively, you
can store your user information in the HTTPSession from the login servlet
and access it from inside the RAP application like RWT.getRequest
().getSession().getAttributer() ...

Hope this helps, Ralf

--
Ralf Sternberg

Twitter: http://twitter.com/ralfstx
Blog: http://www.eclipsesource.com/blogs/

Professional support for RAP and RCP?
http://www.eclipsesource.com/support/
Previous Topic:menu arrows not shown behind gateway
Next Topic:SessionSingletonBase reset each time the page is refreshed
Goto Forum:
  


Current Time: Mon Oct 25 15:10:04 GMT 2021

Powered by FUDForum. Page generated in 0.01382 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top