source: TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/controllers/secured.py @ 7077

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/pylonsapp/pylonsapp/controllers/secured.py@7077
Revision 7077, 672 bytes checked in by pjkersha, 9 years ago (diff)
  • Property svn:keywords set to Id
Line 
1import logging
2
3from pylons import request, response, session, tmpl_context as c, url
4from pylons.controllers.util import abort, redirect
5
6from pylonsapp.lib.base import BaseController, render
7from ndg.security.server.utils.pylons_ext import AuthenticationDecorators
8
9log = logging.getLogger(__name__)
10   
11   
12class SecuredController(BaseController):
13
14    def index(self):
15        # Return a rendered template
16        return render('/secured.mako')
17   
18    @AuthenticationDecorators.login       
19    def login(self):
20        redirect('/secured/index')
21     
22    @AuthenticationDecorators.logout     
23    def logout(self):
24        log.warning('Got to logout action')
Note: See TracBrowser for help on using the repository browser.