Ignore:
Timestamp:
01/12/08 15:39:41 (12 years ago)
Author:
pjkersha
Message:

ndg.security.server.wsgi.utils.sessionmanagerclient.WSGISessionManagerClient: completed this class and tested in combinedservices unit tests. This class enables WSGI apps to access another Session Manager WSGI app running in the same stack or else make a callout to a remote SOAP service.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/__init__.py

    r4480 r4520  
    2424     
    2525from ndg.security.server.sessionmanager import SessionManager 
    26      
     26from ndg.security.common.credentialwallet import \ 
     27                                        CredentialWalletAttributeRequestDenied   
    2728from ndg.security.common.wssecurity.dom import SignatureHandler 
    2829from ndg.security.common.X509 import X509Cert, X509CertRead 
     
    185186        # X.509 Cert used in signature is preferred over userX509Cert input  
    186187        # element - userX509Cert may have been omitted. 
    187         result = self.sm.getAttCert( 
     188        try: 
     189            attCert = self.sm.getAttCert( 
    188190                            userX509Cert=userX509Cert or request.UserX509Cert, 
    189191                            sessID=request.SessID, 
     
    195197                            extAttCertList=request.ExtAttCert, 
    196198                            extTrustedHostList=request.ExtTrustedHost) 
    197         if result[0]: 
    198             response.AttCert = result[0].toString()  
    199              
    200         response.Msg, response.ExtAttCertOut = result[1:] 
    201          
    202         return response 
     199            response.AttCert = attCert.toString()  
     200             
     201        except CredentialWalletAttributeRequestDenied, e: 
     202            # Exception object contains a list of attribute certificates 
     203            # which could be used to re-try to get authorisation via a mapped 
     204            # certificate 
     205            response.Msg = str(e) 
     206            response.ExtAttCertOut = e.extAttCertList 
     207         
     208        return response 
Note: See TracChangeset for help on using the changeset viewer.