• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 Apps. Want user to login once can access both apps

 
Vince Hon
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 webapps. appA and appB.

Usually:
1. User login via appA
2. appA put a object in the session for tracking and to determine whether the user has login or not.
3. After login, user can view pages in appA

Now I add a new app -- appB.
I want the user login in appA can also access resource in appB. i.e. user login once can access both apps. How can I do that ? I have searched some info about session sharing across Applications, but it seems dosn't work.

my appA archecture is a *.ear file contains:
- appA.war ( using struts framework)
- appA.jar ( using EJB as the business layer)

Thanks
Vince
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Quick initial thoughts, have you got a common database or LDAP server across the applications that could be used?

Karianna
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some commercial single-signon products like SiteMinder use a filter in front of all your normal web processing. You can use the same filter in front of multiple applications. The filter checks for a "passed security" cookie with a session token value and validates the session token against a central server. If the cookie is not there or if the session token is stale it redirects to a login page. After login it creates a new session token and sets the cookie. That way you can put security on all your pages without touching a line of your code, and use one signon for all apps that share the filter. Kinda cool.

I have only the highest level exposure to these things so this could be anywhere from slightly to dangerously incorrect. Look to the product literature or Google for details ...
 
Vince Hon
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all reply !.

Both webapps share the same database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic