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, 11 years ago
(diff) |
|
-
Property svn:keywords set to
Id
|
Line | |
---|
1 | import logging |
---|
2 | |
---|
3 | from pylons import request, response, session, tmpl_context as c, url |
---|
4 | from pylons.controllers.util import abort, redirect |
---|
5 | |
---|
6 | from pylonsapp.lib.base import BaseController, render |
---|
7 | from ndg.security.server.utils.pylons_ext import AuthenticationDecorators |
---|
8 | |
---|
9 | log = logging.getLogger(__name__) |
---|
10 | |
---|
11 | |
---|
12 | class 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.