Package ndg :: Package saml :: Package saml2 :: Package binding :: Package soap
[hide private]

Source Code for Package ndg.saml.saml2.binding.soap

 1  """SAML 2.0 SOAP Binding package 
 2   
 3  Implementation of SAML 2.0 for NDG Security 
 4   
 5  NERC DataGrid Project 
 6  """ 
 7  __author__ = "P J Kershaw" 
 8  __date__ = "30/06/10" 
 9  __copyright__ = "(C) 2009 Science and Technology Facilities Council" 
10  __contact__ = "Philip.Kershaw@stfc.ac.uk" 
11  __license__ = "http://www.apache.org/licenses/LICENSE-2.0" 
12  __contact__ = "Philip.Kershaw@stfc.ac.uk" 
13  __revision__ = "$Id: __init__.py 7259 2010-08-02 12:26:32Z pjkersha $" 
14  from ndg.saml.saml2.core import Response 
15   
16                                    
17 -class SOAPBindingError(Exception):
18 '''Base exception type for client SAML SOAP Binding'''
19 20
21 -class SOAPBindingInvalidResponse(SOAPBindingError):
22 '''Raise if the response is invalid'''
23 - def __init__(self, *arg, **kw):
24 SOAPBindingError.__init__(self, *arg, **kw) 25 self.__response = None
26
27 - def _getResponse(self):
28 '''Gets the response corresponding to this error 29 30 @return the response 31 ''' 32 return self.__response
33
34 - def _setResponse(self, value):
35 '''Sets the response corresponding to this error. 36 37 @param value: the response 38 ''' 39 if not isinstance(value, Response): 40 raise TypeError('"response" must be a %r, got %r' % (Response, 41 type(value))) 42 self.__response = value
43 44 response = property(fget=_getResponse, fset=_setResponse, 45 doc="SAML Response associated with this exception")
46