-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Keeping track of logged-in user (binding session to a User)
PostPosted: Mon Sep 27, 2010 12:00 pm 
Newbie

Joined: Mon Sep 27, 2010 11:05 am
Posts: 6
Hi,

I have a persisted User object.

I would like to be able to make each Hibernate session have a default "User". My idea is that in my view, one the user authenticates, I will assign the Session to a particular User and every operation henceforth will be within that user's context. The session will be created with a default "UnAuthenticated" user, so that if no user has authenticated yet, then all operations will be performed in a unauthenticated context.

I realize there are additional frameworks that can get me better authentication, but can I get home-grown authentication working this way?

What design patterns are there for doing this?

With regards,

John


Top
 Profile  
 
 Post subject: Re: Keeping track of logged-in user (binding session to a User)
PostPosted: Tue Sep 28, 2010 2:10 pm 
Newbie

Joined: Mon Sep 27, 2010 11:05 am
Posts: 6
Bump.

Can I provide any more info to explain this issue clearer?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.