Op 17-02-11 23:23, Andrea Brugiolo schreef:
On Tue, Feb 15, 2011 at 05:39:00PM +0100, Maurits van Rees wrote:
I have recently released this PAS plugin that also has extraction and
authentication; maybe its code has some hints for you:
http://pypi.python.org/pypi/pas.plugins.aselect
(also on the collective)
Thank you for your example, Maurits.
Now I am looking into your code trying to solve another problem but I
seem you do something different; I authenticate against an external
service and I don't create real users in Plone (while you do in your
plugin, if I am not wrong), so, I need a data structure in my plugin
to temporarily store information about users who logged-in through it.
Then I would like to catch the user logout action from within my
plugin in order to do some cleaning in my volatile user storage (the
data structure).
I have tried to use the resetCredential interface but it seems Plone
doesn't consider it and I don't know if it is the right place.
I don't remember having done anything with resetCredentials myself, but
it does look like the correct spot.
Do you know where I could write some lines to do cleaning stuff on
user logout (within my plugin)?
You can look at Products/CMFPlone/skins/plone_login/logout.cpy which is
what is executed when clicking on the 'logout' link.
The main call there is to the logoutUser method in
Products/CMFPlone/MembershipTool.py
Maybe the code trail there leads you somewhere.
Of course, note that not everyone actually clicks on the 'logout' link,
so this code will not always get called.
--
Maurits van Rees
Web App Programmer at Zest Software: http://zestsoftware.nl
Personal website: http://maurits.vanrees.org/
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/product-developers