Ignore:
Timestamp:
30/01/09 13:46:56 (11 years ago)
Author:
pjkersha
Message:
  • fixed inclusion of badc templates and static content for SSO in ndg.security.server egg
  • fix to SSO logout controller to use WSGI client wrapper for Session Manager call
  • Refactored SM and AA WSGI client wrappers adding a base class in clientbase module and including check for match for URI request by client to URI endpoint of WSGI service running locally.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/controllers/logout.py

    r4384 r4890  
     1"""Single Sign On Service Logout Controller 
     2 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "10/12/08" 
     7__copyright__ = "(C) 2009 Science and Technology Facilities Council" 
     8__license__ = "BSD - see LICENSE file in top-level directory" 
     9__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     10__revision__ = '$Id$' 
    111from ndg.security.server.sso.sso.lib.base import * 
    212from ndg.security.common.pylons.security_util import SecuritySession 
     
    818from urlparse import urlsplit, urlunsplit 
    919 
    10 from ndg.security.common.sessionmanager import SessionManagerClient 
     20from ndg.security.server.wsgi.utils.sessionmanagerclient import \ 
     21    WSGISessionManagerClient, SessionExpired, AttributeRequestDenied 
    1122 
    1223 
     
    3142         
    3243        try: 
    33             smClnt = SessionManagerClient(uri=session['ndgSec']['h'], 
    34                                       tracefile=cfg.tracefile, 
    35                                       **cfg.wss)        
     44            smClnt = WSGISessionManagerClient(uri=session['ndgSec']['h'], 
     45                        environ=request.environ, 
     46                        tracefile=cfg.tracefile, 
     47                        sslCACertFilePathList=self.cfg.sslCACertFilePathList, 
     48                        **cfg.wss)        
    3649        except Exception, e: 
    3750            log.error("logout - creating Session Manager client: %s" % e) 
     
    3952         
    4053        # Disconnect from Session Manager 
    41         log.info('Calling Session Manager "%s" disconnect for logout...' % \ 
     54        log.info('Calling Session Manager "%s" disconnect for logout...' % 
    4255                 session['ndgSec']['h']) 
    4356        try: 
     
    8497            getCredentialsIdx = b64decReturnTo.rfind('/getCredentials') 
    8598            if getCredentialsIdx != -1: 
    86                 log.debug(\ 
    87                     "Reverting request URL from getCredentials to login...") 
     99                log.debug("Reverting request URL from getCredentials to " 
     100                          "login...") 
    88101                b64decReturnTo = b64decReturnTo[:getCredentialsIdx] + '/login' 
    89102             
     
    98111 
    99112            # and now go back to whence we had come 
    100             log.debug("LogoutController._redirect: redirect to %s" % \ 
     113            log.debug("LogoutController._redirect: redirect to %s" % 
    101114                                                              b64decReturnTo) 
    102115            h.redirect_to(b64decReturnTo) 
Note: See TracChangeset for help on using the changeset viewer.