Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class ISessionPlugin(Interface):
00004     """
00005     Session handling PAS plugin.
00006     """
00007 
00008     def setupSession(userid, response):
00009         """
00010         Start a new session for a userid. The session will last until
00011         PAS indicates that the user has logged out.
00012         """
00013 
00014 
00015 class ISessionSource(Interface):
00016     """
00017     A session source is an object which creates a session identified and
00018     can verify if session is still valid.
00019     """
00020 
00021     def createIdentifier(userid):
00022         """
00023         Return an identifier for a userid. An identifier is a standard python
00024         string object.
00025         """
00026 
00027 
00028     def verifyIdentifier(identifier):
00029         """
00030         Verify if an identity corresponds to a valid session. Returns
00031         a boolean indicating if the identify is valid.
00032         """
00033 
00034 
00035     def extractUserId(identifier):
00036         """
00037         Extract the user id from an identifier.
00038         """
00039 
00040 
00041     def invalidateSession(principal=None):
00042         """
00043         Mark a session for a principal as invalid. A source may not support
00044         this, in which case it should return False.
00045         """
00046 
00047 
00048