[Seaside] How to work with sessions

Alain Fischer alain.fischer@bluewin.ch
Sun, 31 Mar 2002 22:45:49 +0200


Hi Avi,

I wanted to add session management to my application to be able
to login logout have a session timeout after some defined time of 
unactivity.
I wanted a user to logout form his session and to start a new session 
with
higer privilege for example.

The login is easy with IAAuthenticatedSession.

The logout is more difficult to implement and seem to be browser 
dependant.
I have tried to implement this in a subclass of IAAuthenticatedSession:

	authenticateUser: aUser password: aPassword
		userDisabled ifNotNil: [userDisabled ifTrue: [userDisabled := 
false. ^ false]].
		^ aUser = 'toto' and: [aPassword = 'toto']

userDisabled is set to true in a page action method, but this doesen't 
work.

I haven't  tried anything for timeout.

I have seen the IATransaction, perhaps this could be used instead of 
session.
What do you think ? Any hints ?

Have a nice day
Alain.