source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/logout.py @ 2695

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/logout.py@2695
Revision 2695, 901 bytes checked in by lawrence, 14 years ago (diff)

wcs now security and cache compliant

Line 
1from ows_server.lib.base import *
2from paste.request import parse_querystring
3class LogoutController(BaseController):
4    ''' Provides the pylons controller for logging out and killing the cookies '''
5   
6    def __setup(self):
7        #where are we going back to?
8        self.inputs=dict(parse_querystring(request.environ))
9        if 'r' in self.inputs:
10            c.returnTo=self.inputs['r']
11        else:
12            c.returnTo=''
13   
14    def index(self):
15        ''' Ok, you really want to logout here '''
16        self.__setup()
17       
18        # easy to kill our cookie
19        if 'ndgSec' in session: del session['ndgSec']
20        if 'ndgCleared' in session: del session['ndgCleared']
21       
22        session.save()
23       
24        # but now we should look into the session and go kill the wallet
25       
26        # and now go back to whence we had come
27        h.redirect_to(c.returnTo)
Note: See TracBrowser for help on using the repository browser.