[Zope3-dev] Re: principal events for the event hub

Christian Heimes heimes@faho.rwth-aachen.de
Fri, 11 Apr 2003 16:01:40 +0200


Christian Heimes wrote:
> While trying to solve a problem I discovered that there are no events 
> pertaining to principals. You can't monitor the event hub for a 
> principal login to take actions when he/she is logged in.

As Guido told me I'll try to explain my proposal in detail:

I'm currently working on the principal annotation service. I need to 
gather informations when a principal logs in, for example calculate how 
many and which pages in a zwiki had changed and were added. My first 
tought was to listen to a PrincipalLoginEvent on the event hub. The 
event hub does not support this type of events.
Then I gathered all events I could imagine concerning principals and 
wrote them down. This is the list in the message above. The most 
important events are the login and logout events but I think the other 
events could be usefull in some cases.

I discussed this ideas with steve on #zope3-dev. We figured out that it 
is hard to verify that a principal logs in or out for http sessions. :(

ftp: login successful after PASS command with the right password, logout 
  when the connection is closed

http form: login after button pressed and login data is verified, logout 
could be button pressed or session timeout

http login via authorization request: hard, maybe we could use the 
changes from no authorization to correct authorization in the request, 
logout via session timeout (?)

http ssl certs: when a new session is created (?)

webdav: like http

xml-rpc: I don't know anything about rpc calls.

Christian