Form based authentication - last login

2004-09-03 Thread hicnar
Hi All,

I'm supposed to record the last login timestamp.
IMHO the best sollution would be to intercept the authentication process (I'm working 
with Tomcat 4.x), to smuggle some custom code there that updates the appropriate 
column in the database. The question is.. how can I do this?? Or maybe someone has a 
better idea how to do this??

Thanx in advance for your suggestions
Chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form based authentication - last login

2004-09-03 Thread QM
On Fri, Sep 03, 2004 at 10:08:59AM +0200, [EMAIL PROTECTED] wrote:
: IMHO the best sollution would be to intercept the authentication process (I'm 
working with Tomcat 4.x), to smuggle some custom code there that updates the 
appropriate column in the database. The question is.. how can I do this?? Or maybe 
someone has a better idea how to do this??

There are several ways to do this, I'm sure.  My preferred method:

map a Filter to the protected area(s) that checks for the presence of
some session object.  If the object isn't there, the person has just
logged in, so you record the timestamp and store the object.  Otherwise,
the person's already logged in and the filter can pass the
request/response down the chain.

The marker object needn't be anything special: a simple Boolean will do,
if you don't store any other objects for users who are logged in.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]