source: TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/config/ssoMiddleware.py @ 3699

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/config/ssoMiddleware.py@3699
Revision 3699, 543 bytes checked in by pjkersha, 12 years ago (diff)

Separated LoginService? into server and client components sso and ssoClient respectively. Packaging needs re-organising.

  • Made important fix to redirect_to - this doesn't work when called from a BaseController?.call in Pylons 0.9.6 - moved to before method instead.
Line 
1'''
2Security middleware - set-up configuration items
3
4P J Kershaw 18/03/08
5'''
6from ndg.security.common.pylons.security_util import SecurityConfig
7
8class SSOMiddleware:
9   
10    def __init__(self, app, cfgFilePath, appGlobals):
11        self.app = app
12        self.config = SecurityConfig(cfgFilePath)
13        self.config.read()
14        appGlobals.securityCfg = self.config
15         
16    def __call__(self, environ, start_response):
17       
18        environ['securityConfig'] = self.config
19        return self.app(environ, start_response)
20   
Note: See TracBrowser for help on using the repository browser.