Package ndg :: Package saml :: Package common :: Class SAMLObject
[hide private]

Class SAMLObject

source code


Base class for all SAML types

Instance Methods [hide private]
 
__init__(self, namespaceURI='urn:oasis:names:tc:SAML:2.0:assertion', elementLocalName=None, namespacePrefix='saml')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
dict
__getstate__(self)
Enable pickling
source code
 
__setstate__(self, attrDict)
Enable pickling
source code

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

Class Methods [hide private]
saml.saml2.common.SAMLObject derived type
fromXML(cls, xmlObject)
Parse from an XML representation into a SAML object.
source code
XML class e.g. ElementTree or 4Suite XML
toXML(cls, samlObject)
Convert the input SAML object into an XML representation.
source code
Class Variables [hide private]
None DEFAULT_ELEMENT_LOCAL_NAME = None
default XML element name - derived classes must specify
Instance Variables [hide private]
ndg.saml.common.xml.QName __qname
qualified name for XML element
Properties [hide private]
ndg.saml.common.xml.QName qname
Qualified Name for this type

Inherited from object: __class__

Method Details [hide private]

__init__(self, namespaceURI='urn:oasis:names:tc:SAML:2.0:assertion', elementLocalName=None, namespacePrefix='saml')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • namespaceURI (basestring) - the namespace the element is in
  • elementLocalName (NoneType/basestring) - the local name of the XML element this Object represents, defaults to DEFAULT_ELEMENT_LOCAL_NAME. Ensure that this is set to a valid string in derived classes rather the None base class setting
  • namespacePrefix (basestring) - the prefix for the given namespace
Overrides: object.__init__

fromXML(cls, xmlObject)
Class Method

source code 

Parse from an XML representation into a SAML object. Abstract method

  • derived types should implement
Parameters:
  • xmlObject (XML class e.g. ElementTree or 4Suite XML type) - XML representation of SAML Object
Returns: saml.saml2.common.SAMLObject derived type
SAML object

toXML(cls, samlObject)
Class Method

source code 

Convert the input SAML object into an XML representation. Abstract method - derived types should implement

Parameters:
  • samlObject (saml.saml2.common.SAMLObject derived type) - SAML object
Returns: XML class e.g. ElementTree or 4Suite XML
XML representation of SAML Object

__getstate__(self)

source code 

Enable pickling

Returns: dict
object's attribute dictionary

__setstate__(self, attrDict)

source code 

Enable pickling

Parameters:
  • attrDict (dict) - object's attribute dictionary

Property Details [hide private]

qname

Qualified Name for this type

Get Method:
unreachable.qname(self) - Qualified Name for this type
Type:
ndg.saml.common.xml.QName