Hi all:
I'm using realm tool for user authentication on Tomcat 7
I've made a custom realm overriding authenticate() method of
DataSourceRealm class.
And all works fine.
But I would like to initialize HTTP session in this stage with user data.
My custom authenticate() method queries user data
But I would like to initialize HTTP session in this stage with user data.
My custom authenticate() method queries user data to check if exists
or not , and I wouldn't like to have to call another service to
perform the same query.
Couldn't you just implement HttpSessionListener?
Chris
2011/7/18 chris derham ch...@derham.me.uk:
Couldn't you just implement HttpSessionListener?
Chris
Yes, could be useful :-)
Thanks
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands,
2011/7/18 Chema demablo...@gmail.com
Yes, could be useful :-)
Thanks
I guess it's not so useful than I thought :-/
The reason is that HttpSessionListener.sessionCreated method is
invoked always when Tomcat server receives the first petition.
Session is not created by realm code when user
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chema,
On 7/18/2011 9:16 AM, Chema wrote:
Now I'm trying to use filters. When realm code validates an user ,
redirect to protected resource. If I can filter this redirection and
load user data into session, I think that could works
This is how