Package ndg :: Package saml :: Package saml2 :: Package binding :: Package soap :: Package client :: Class SOAPBinding
[hide private]

Class SOAPBinding

source code


Client SAML SOAP Binding

Instance Methods [hide private]
 
__init__(self, requestEnvelopeClass=<class 'ndg.soap.etree.SOAPEnvelope'>, responseEnvelopeClass=<class 'ndg.soap.etree.SOAPEnvelope'>, serialise=None, deserialise=None, handlers=())
Create SAML SOAP Client - Nb.
source code
 
_getSerialise(self) source code
 
_setSerialise(self, value) source code
 
_getDeserialise(self) source code
 
_setDeserialise(self, value) source code
 
_getRequestEnvelopeClass(self) source code
 
_setRequestEnvelopeClass(self, value) source code
 
_getClient(self) source code
 
_setClient(self, value) source code
 
send(self, samlObj, uri=None, request=None)
Make an request/query to a remote SAML service
source code
 
parseConfig(self, cfg, prefix='', section='DEFAULT')
Read config file settings
source code
 
parseKeywords(self, prefix='', **kw)
Update object from input keywords
source code
 
__setattr__(self, name, value)
Enable setting of SOAPBinding.client.responseEnvelopeClass as if it were an attribute of self
source code
 
__getstate__(self)
Explicit implementation needed with __slots__
source code
 
__setstate__(self, attrDict)
Explicit implementation needed with __slots__
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
ndg.saml.saml2.binding.soap.client.SOAPBinding or derived type
fromConfig(cls, cfg, **kw)
Alternative constructor makes object from config file settings
source code
ndg.saml.saml2.binding.soap.client.SOAPBinding or derived type
fromKeywords(cls, prefix='', **kw)
Create a new instance initialising instance variables from the keyword inputs
source code
Static Methods [hide private]
 
isIterable(obj) source code
Class Variables [hide private]
  SOAP_ACTION = 'http://www.oasis-open.org/committees/security'
  REQUEST_ENVELOPE_CLASS_OPTNAME = 'requestEnvelopeClass'
  RESPONSE_ENVELOPE_CLASS_OPTNAME = 'responseEnvelopeClass'
  SERIALISE_OPTNAME = 'serialise'
  DESERIALISE_OPTNAME = 'deserialise'
  CONFIG_FILE_OPTNAMES = ('requestEnvelopeClass', 'responseEnvel...
  __PRIVATE_ATTR_PREFIX = '__'
Properties [hide private]
  serialise
callable to serialise request into XML type
  deserialise
callable to de-serialise response from XML type
  requestEnvelopeClass
SOAP Envelope Request Class
  client
SOAP Client object
  __client
  __deserialise
  __requestEnvelopeClass
  __responseEnvelopeClass
  __serialise

Inherited from object: __class__

Method Details [hide private]

__init__(self, requestEnvelopeClass=<class 'ndg.soap.etree.SOAPEnvelope'>, responseEnvelopeClass=<class 'ndg.soap.etree.SOAPEnvelope'>, serialise=None, deserialise=None, handlers=())
(Constructor)

source code 

Create SAML SOAP Client - Nb. serialisation functions must be set before send()ing the request

Overrides: object.__init__

send(self, samlObj, uri=None, request=None)

source code 

Make an request/query to a remote SAML service

Parameters:
  • samlObj (saml.common.SAMLObject) - SAML query/request object
  • uri (basestring) - uri of service. May be omitted if set from request.url
  • request (ndg.security.common.soap.UrlLib2SOAPRequest) - SOAP request object to which query will be attached defaults to ndg.security.common.soap.client.UrlLib2SOAPRequest

fromConfig(cls, cfg, **kw)
Class Method

source code 

Alternative constructor makes object from config file settings

Parameters:
  • cfg (basestring / ConfigParser derived type) - configuration file path or ConfigParser type object
Returns: ndg.saml.saml2.binding.soap.client.SOAPBinding or derived type
new instance of this class

parseConfig(self, cfg, prefix='', section='DEFAULT')

source code 

Read config file settings

Parameters:
  • cfg (basestring /ConfigParser derived type) - configuration file path or ConfigParser type object
  • prefix (basestring) - prefix for option names e.g. "attributeQuery."
  • section (baestring) - configuration file section from which to extract parameters.

parseKeywords(self, prefix='', **kw)

source code 

Update object from input keywords

Parameters:
  • prefix (basestring) - if a prefix is given, only update self from kw items where keyword starts with this prefix
  • kw (dict) - items corresponding to class instance variables to update. Keyword names must match their equivalent class instance variable names. However, they may prefixed with <prefix>

fromKeywords(cls, prefix='', **kw)
Class Method

source code 

Create a new instance initialising instance variables from the keyword inputs

Parameters:
  • prefix (basestring) - if a prefix is given, only update self from kw items where keyword starts with this prefix
  • kw (dict) - items corresponding to class instance variables to update. Keyword names must match their equivalent class instance variable names. However, they may prefixed with <prefix>
Returns: ndg.saml.saml2.binding.soap.client.SOAPBinding or derived type
new instance of this class

__setattr__(self, name, value)

source code 

Enable setting of SOAPBinding.client.responseEnvelopeClass as if it were an attribute of self

Overrides: object.__setattr__

Class Variable Details [hide private]

CONFIG_FILE_OPTNAMES

Value:
('requestEnvelopeClass',
 'responseEnvelopeClass',
 'serialise',
 'deserialise')

Property Details [hide private]

serialise

callable to serialise request into XML type

Get Method:
_getSerialise(self)
Set Method:
_setSerialise(self, value)

deserialise

callable to de-serialise response from XML type

Get Method:
_getDeserialise(self)
Set Method:
_setDeserialise(self, value)

requestEnvelopeClass

SOAP Envelope Request Class

Get Method:
_getRequestEnvelopeClass(self)
Set Method:
_setRequestEnvelopeClass(self, value)

client

SOAP Client object

Get Method:
_getClient(self)
Set Method:
_setClient(self, value)