Solved

Where/how to rememeber the user is authenticated already in J2ee programmatic security?

Posted on 2006-06-29
1
251 Views
Last Modified: 2013-11-24

I am doing a programmatic security in J2EE.

siteA tries to access my siteB(J2ee) with a token appended in the URL.
In siteB, I verify the token. If it is good, I let him to access the requested page.

My question, where and how do I store the info that he was "authenticated" already? Then, if he accesses another page on siteB, I do not need verify the token anymore.

0
Comment
Question by:workbench
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
mukundha_expert earned 250 total points
ID: 17015219
If both siteA and siteB are part of the same application, then you can create session and add the userInfo to the session.

if you are using a token to authenticate in siteB, then you can create a new session in siteB and add the userInfo to that session. so whenever the user tries to access another page in the same site you can use the sessoin information to authenticate him,


Like,

from siteA you are sending a request to siteB with a token in request say user = "jack"

In siteB,

user = request.getParameter("user") ;
session = request.getSession () ;
session.setAttibute ( "user" , user ) ;

In another page of siteB,

user = session.getAttribute ( "user" ) ;
if ( user == null )
   Not autheticated
else
  authenticated
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question