Logo Search packages:      
Sourcecode: zope-pas version File versions  Download package

def PluggableAuthService-1.4::PluggableAuthService::PluggableAuthService::logout (   self,
  REQUEST 
)

Publicly accessible method to log out a user

Definition at line 1083 of file PluggableAuthService.py.

01083                              :
        """Publicly accessible method to log out a user
        """
        self.resetCredentials(REQUEST, REQUEST['RESPONSE'])

        # Little bit of a hack: Issuing a redirect to the same place
        # where the user was so that in the second request the now-destroyed
        # credentials can be acted upon to e.g. go back to the login page
        referrer = REQUEST.get('HTTP_REFERER') # HTTP_REFERER is optional header
        if referrer:
            REQUEST['RESPONSE'].redirect(referrer)

    security.declarePublic('resetCredentials')
    def resetCredentials(self, request, response):


Generated by  Doxygen 1.6.0   Back to index