summaryrefslogtreecommitdiff
path: root/src/saml2/ws
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2015-06-14 14:00:24 +0100
committerRoland Hedberg <roland.hedberg@adm.umu.se>2015-06-14 14:00:24 +0100
commitafca69c20b7561a0728a93a7c7c76d8f343699b0 (patch)
tree04735dde9360db39918fb9ab3d2241c9e9bf024e /src/saml2/ws
parentc4eac4878c6390859a081d4dc201136e59f2089a (diff)
downloadpysaml2-afca69c20b7561a0728a93a7c7c76d8f343699b0.tar.gz
WS security XML support
Diffstat (limited to 'src/saml2/ws')
-rw-r--r--src/saml2/ws/__init__.py1
-rw-r--r--src/saml2/ws/wsaddr.py531
-rw-r--r--src/saml2/ws/wspol.py241
-rw-r--r--src/saml2/ws/wssec.py546
-rw-r--r--src/saml2/ws/wstrust.py1802
-rw-r--r--src/saml2/ws/wsutil.py184
6 files changed, 3305 insertions, 0 deletions
diff --git a/src/saml2/ws/__init__.py b/src/saml2/ws/__init__.py
new file mode 100644
index 00000000..16f3a796
--- /dev/null
+++ b/src/saml2/ws/__init__.py
@@ -0,0 +1 @@
+__author__ = 'roland'
diff --git a/src/saml2/ws/wsaddr.py b/src/saml2/ws/wsaddr.py
new file mode 100644
index 00000000..fe41e57a
--- /dev/null
+++ b/src/saml2/ws/wsaddr.py
@@ -0,0 +1,531 @@
+#!/usr/bin/env python
+
+#
+# Generated Sun Jun 14 13:38:21 2015 by parse_xsd.py version 0.5.
+#
+
+import saml2
+from saml2 import SamlBase
+
+
+NAMESPACE = 'http://www.w3.org/2005/08/addressing'
+
+class ReferenceParametersType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:ReferenceParametersType element """
+
+ c_tag = 'ReferenceParametersType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def reference_parameters_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ReferenceParametersType_, xml_string)
+
+
+class MetadataType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:MetadataType element """
+
+ c_tag = 'MetadataType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def metadata_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(MetadataType_, xml_string)
+
+
+class RelationshipTypeOpenEnum_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:RelationshipTypeOpenEnum element """
+
+ c_tag = 'RelationshipTypeOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def relationship_type_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RelationshipTypeOpenEnum_, xml_string)
+
+class RelationshipType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:RelationshipType element """
+
+ c_tag = 'RelationshipType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://www.w3.org/2005/08/addressing/reply']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def relationship_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RelationshipType_, xml_string)
+
+
+class AttributedURIType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:AttributedURIType element """
+
+ c_tag = 'AttributedURIType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def attributed_uri_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedURIType_, xml_string)
+
+
+class FaultCodesOpenEnumType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:FaultCodesOpenEnumType element """
+
+ c_tag = 'FaultCodesOpenEnumType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def fault_codes_open_enum_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(FaultCodesOpenEnumType_, xml_string)
+
+
+class FaultCodesType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:FaultCodesType element """
+
+ c_tag = 'FaultCodesType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:QName', 'enumeration': ['tns:InvalidAddressingHeader', 'tns:InvalidAddress', 'tns:InvalidEPR', 'tns:InvalidCardinality', 'tns:MissingAddressInEPR', 'tns:DuplicateMessageID', 'tns:ActionMismatch', 'tns:MessageAddressingHeaderRequired', 'tns:DestinationUnreachable', 'tns:ActionNotSupported', 'tns:EndpointUnavailable']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def fault_codes_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(FaultCodesType_, xml_string)
+
+
+class AttributedUnsignedLongType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:AttributedUnsignedLongType element """
+
+ c_tag = 'AttributedUnsignedLongType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'unsignedLong'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def attributed_unsigned_long_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedUnsignedLongType_, xml_string)
+
+
+class AttributedQNameType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:AttributedQNameType element """
+
+ c_tag = 'AttributedQNameType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'QName'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def attributed_q_name_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedQNameType_, xml_string)
+
+
+class ProblemIRI(AttributedURIType_):
+ """The http://www.w3.org/2005/08/addressing:ProblemIRI element """
+
+ c_tag = 'ProblemIRI'
+ c_namespace = NAMESPACE
+ c_children = AttributedURIType_.c_children.copy()
+ c_attributes = AttributedURIType_.c_attributes.copy()
+ c_child_order = AttributedURIType_.c_child_order[:]
+ c_cardinality = AttributedURIType_.c_cardinality.copy()
+
+def problem_iri_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProblemIRI, xml_string)
+
+
+class EndpointReferenceType_Address(AttributedURIType_):
+
+ c_tag = 'Address'
+ c_namespace = NAMESPACE
+ c_children = AttributedURIType_.c_children.copy()
+ c_attributes = AttributedURIType_.c_attributes.copy()
+ c_child_order = AttributedURIType_.c_child_order[:]
+ c_cardinality = AttributedURIType_.c_cardinality.copy()
+
+def endpoint_reference_type__address_from_string(xml_string):
+ return saml2.create_class_from_xml_string(EndpointReferenceType_Address, xml_string)
+
+
+class ReferenceParameters(ReferenceParametersType_):
+ """The http://www.w3.org/2005/08/addressing:ReferenceParameters element """
+
+ c_tag = 'ReferenceParameters'
+ c_namespace = NAMESPACE
+ c_children = ReferenceParametersType_.c_children.copy()
+ c_attributes = ReferenceParametersType_.c_attributes.copy()
+ c_child_order = ReferenceParametersType_.c_child_order[:]
+ c_cardinality = ReferenceParametersType_.c_cardinality.copy()
+
+def reference_parameters_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ReferenceParameters, xml_string)
+
+
+class Metadata(MetadataType_):
+ """The http://www.w3.org/2005/08/addressing:Metadata element """
+
+ c_tag = 'Metadata'
+ c_namespace = NAMESPACE
+ c_children = MetadataType_.c_children.copy()
+ c_attributes = MetadataType_.c_attributes.copy()
+ c_child_order = MetadataType_.c_child_order[:]
+ c_cardinality = MetadataType_.c_cardinality.copy()
+
+def metadata_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Metadata, xml_string)
+
+
+class MessageID(AttributedURIType_):
+ """The http://www.w3.org/2005/08/addressing:MessageID element """
+
+ c_tag = 'MessageID'
+ c_namespace = NAMESPACE
+ c_children = AttributedURIType_.c_children.copy()
+ c_attributes = AttributedURIType_.c_attributes.copy()
+ c_child_order = AttributedURIType_.c_child_order[:]
+ c_cardinality = AttributedURIType_.c_cardinality.copy()
+
+def message_id_from_string(xml_string):
+ return saml2.create_class_from_xml_string(MessageID, xml_string)
+
+
+class RelatesToType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:RelatesToType element """
+
+ c_tag = 'RelatesToType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['RelationshipType'] = ('relationship_type', RelationshipTypeOpenEnum_, False)
+
+ def __init__(self,
+ relationship_type='http://www.w3.org/2005/08/addressing/reply',
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.relationship_type=relationship_type
+
+def relates_to_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RelatesToType_, xml_string)
+
+
+class To(AttributedURIType_):
+ """The http://www.w3.org/2005/08/addressing:To element """
+
+ c_tag = 'To'
+ c_namespace = NAMESPACE
+ c_children = AttributedURIType_.c_children.copy()
+ c_attributes = AttributedURIType_.c_attributes.copy()
+ c_child_order = AttributedURIType_.c_child_order[:]
+ c_cardinality = AttributedURIType_.c_cardinality.copy()
+
+def to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(To, xml_string)
+
+
+class Action(AttributedURIType_):
+ """The http://www.w3.org/2005/08/addressing:Action element """
+
+ c_tag = 'Action'
+ c_namespace = NAMESPACE
+ c_children = AttributedURIType_.c_children.copy()
+ c_attributes = AttributedURIType_.c_attributes.copy()
+ c_child_order = AttributedURIType_.c_child_order[:]
+ c_cardinality = AttributedURIType_.c_cardinality.copy()
+
+def action_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Action, xml_string)
+
+
+class RetryAfter(AttributedUnsignedLongType_):
+ """The http://www.w3.org/2005/08/addressing:RetryAfter element """
+
+ c_tag = 'RetryAfter'
+ c_namespace = NAMESPACE
+ c_children = AttributedUnsignedLongType_.c_children.copy()
+ c_attributes = AttributedUnsignedLongType_.c_attributes.copy()
+ c_child_order = AttributedUnsignedLongType_.c_child_order[:]
+ c_cardinality = AttributedUnsignedLongType_.c_cardinality.copy()
+
+def retry_after_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RetryAfter, xml_string)
+
+
+class ProblemHeaderQName(AttributedQNameType_):
+ """The http://www.w3.org/2005/08/addressing:ProblemHeaderQName element """
+
+ c_tag = 'ProblemHeaderQName'
+ c_namespace = NAMESPACE
+ c_children = AttributedQNameType_.c_children.copy()
+ c_attributes = AttributedQNameType_.c_attributes.copy()
+ c_child_order = AttributedQNameType_.c_child_order[:]
+ c_cardinality = AttributedQNameType_.c_cardinality.copy()
+
+def problem_header_q_name_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProblemHeaderQName, xml_string)
+
+
+class ProblemActionType_SoapAction(SamlBase):
+
+ c_tag = 'SoapAction'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def problem_action_type__soap_action_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProblemActionType_SoapAction, xml_string)
+
+
+class ProblemActionType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:ProblemActionType element """
+
+ c_tag = 'ProblemActionType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://www.w3.org/2005/08/addressing}Action'] = ('action', Action)
+ c_cardinality['action'] = {"min":0, "max":1}
+ c_children['{http://www.w3.org/2005/08/addressing}SoapAction'] = ('soap_action', ProblemActionType_SoapAction)
+ c_cardinality['soap_action'] = {"min":0, "max":1}
+ c_child_order.extend(['action', 'soap_action'])
+
+ def __init__(self,
+ action=None,
+ soap_action=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.action=action
+ self.soap_action=soap_action
+
+def problem_action_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProblemActionType_, xml_string)
+
+
+class EndpointReferenceType_(SamlBase):
+ """The http://www.w3.org/2005/08/addressing:EndpointReferenceType element """
+
+ c_tag = 'EndpointReferenceType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://www.w3.org/2005/08/addressing}Address'] = ('address', EndpointReferenceType_Address)
+ c_children['{http://www.w3.org/2005/08/addressing}ReferenceParameters'] = ('reference_parameters', ReferenceParameters)
+ c_cardinality['reference_parameters'] = {"min":0, "max":1}
+ c_children['{http://www.w3.org/2005/08/addressing}Metadata'] = ('metadata', Metadata)
+ c_cardinality['metadata'] = {"min":0, "max":1}
+ c_child_order.extend(['address', 'reference_parameters', 'metadata'])
+
+ def __init__(self,
+ address=None,
+ reference_parameters=None,
+ metadata=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.address=address
+ self.reference_parameters=reference_parameters
+ self.metadata=metadata
+
+def endpoint_reference_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(EndpointReferenceType_, xml_string)
+
+
+class RelatesTo(RelatesToType_):
+ """The http://www.w3.org/2005/08/addressing:RelatesTo element """
+
+ c_tag = 'RelatesTo'
+ c_namespace = NAMESPACE
+ c_children = RelatesToType_.c_children.copy()
+ c_attributes = RelatesToType_.c_attributes.copy()
+ c_child_order = RelatesToType_.c_child_order[:]
+ c_cardinality = RelatesToType_.c_cardinality.copy()
+
+def relates_to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RelatesTo, xml_string)
+
+
+class ReplyTo(EndpointReferenceType_):
+ """The http://www.w3.org/2005/08/addressing:ReplyTo element """
+
+ c_tag = 'ReplyTo'
+ c_namespace = NAMESPACE
+ c_children = EndpointReferenceType_.c_children.copy()
+ c_attributes = EndpointReferenceType_.c_attributes.copy()
+ c_child_order = EndpointReferenceType_.c_child_order[:]
+ c_cardinality = EndpointReferenceType_.c_cardinality.copy()
+
+def reply_to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ReplyTo, xml_string)
+
+
+class From(EndpointReferenceType_):
+ """The http://www.w3.org/2005/08/addressing:From element """
+
+ c_tag = 'From'
+ c_namespace = NAMESPACE
+ c_children = EndpointReferenceType_.c_children.copy()
+ c_attributes = EndpointReferenceType_.c_attributes.copy()
+ c_child_order = EndpointReferenceType_.c_child_order[:]
+ c_cardinality = EndpointReferenceType_.c_cardinality.copy()
+
+def from_from_string(xml_string):
+ return saml2.create_class_from_xml_string(From, xml_string)
+
+
+class FaultTo(EndpointReferenceType_):
+ """The http://www.w3.org/2005/08/addressing:FaultTo element """
+
+ c_tag = 'FaultTo'
+ c_namespace = NAMESPACE
+ c_children = EndpointReferenceType_.c_children.copy()
+ c_attributes = EndpointReferenceType_.c_attributes.copy()
+ c_child_order = EndpointReferenceType_.c_child_order[:]
+ c_cardinality = EndpointReferenceType_.c_cardinality.copy()
+
+def fault_to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(FaultTo, xml_string)
+
+
+class ProblemAction(ProblemActionType_):
+ """The http://www.w3.org/2005/08/addressing:ProblemAction element """
+
+ c_tag = 'ProblemAction'
+ c_namespace = NAMESPACE
+ c_children = ProblemActionType_.c_children.copy()
+ c_attributes = ProblemActionType_.c_attributes.copy()
+ c_child_order = ProblemActionType_.c_child_order[:]
+ c_cardinality = ProblemActionType_.c_cardinality.copy()
+
+def problem_action_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProblemAction, xml_string)
+
+
+class EndpointReference(EndpointReferenceType_):
+ """The http://www.w3.org/2005/08/addressing:EndpointReference element """
+
+ c_tag = 'EndpointReference'
+ c_namespace = NAMESPACE
+ c_children = EndpointReferenceType_.c_children.copy()
+ c_attributes = EndpointReferenceType_.c_attributes.copy()
+ c_child_order = EndpointReferenceType_.c_child_order[:]
+ c_cardinality = EndpointReferenceType_.c_cardinality.copy()
+
+def endpoint_reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(EndpointReference, xml_string)
+
+
+ELEMENT_FROM_STRING = {
+ EndpointReference.c_tag: endpoint_reference_from_string,
+ EndpointReferenceType_.c_tag: endpoint_reference_type__from_string,
+ ReferenceParameters.c_tag: reference_parameters_from_string,
+ ReferenceParametersType_.c_tag: reference_parameters_type__from_string,
+ Metadata.c_tag: metadata_from_string,
+ MetadataType_.c_tag: metadata_type__from_string,
+ MessageID.c_tag: message_id_from_string,
+ RelatesTo.c_tag: relates_to_from_string,
+ RelatesToType_.c_tag: relates_to_type__from_string,
+ RelationshipTypeOpenEnum_.c_tag: relationship_type_open_enum__from_string,
+ RelationshipType_.c_tag: relationship_type__from_string,
+ ReplyTo.c_tag: reply_to_from_string,
+ From.c_tag: from_from_string,
+ FaultTo.c_tag: fault_to_from_string,
+ To.c_tag: to_from_string,
+ Action.c_tag: action_from_string,
+ AttributedURIType_.c_tag: attributed_uri_type__from_string,
+ FaultCodesOpenEnumType_.c_tag: fault_codes_open_enum_type__from_string,
+ FaultCodesType_.c_tag: fault_codes_type__from_string,
+ RetryAfter.c_tag: retry_after_from_string,
+ AttributedUnsignedLongType_.c_tag: attributed_unsigned_long_type__from_string,
+ ProblemHeaderQName.c_tag: problem_header_q_name_from_string,
+ AttributedQNameType_.c_tag: attributed_q_name_type__from_string,
+ ProblemIRI.c_tag: problem_iri_from_string,
+ ProblemAction.c_tag: problem_action_from_string,
+ ProblemActionType_.c_tag: problem_action_type__from_string,
+ EndpointReferenceType_Address.c_tag: endpoint_reference_type__address_from_string,
+ ProblemActionType_SoapAction.c_tag: problem_action_type__soap_action_from_string,
+}
+
+ELEMENT_BY_TAG = {
+ 'EndpointReference': EndpointReference,
+ 'EndpointReferenceType': EndpointReferenceType_,
+ 'ReferenceParameters': ReferenceParameters,
+ 'ReferenceParametersType': ReferenceParametersType_,
+ 'Metadata': Metadata,
+ 'MetadataType': MetadataType_,
+ 'MessageID': MessageID,
+ 'RelatesTo': RelatesTo,
+ 'RelatesToType': RelatesToType_,
+ 'RelationshipTypeOpenEnum': RelationshipTypeOpenEnum_,
+ 'RelationshipType': RelationshipType_,
+ 'ReplyTo': ReplyTo,
+ 'From': From,
+ 'FaultTo': FaultTo,
+ 'To': To,
+ 'Action': Action,
+ 'AttributedURIType': AttributedURIType_,
+ 'FaultCodesOpenEnumType': FaultCodesOpenEnumType_,
+ 'FaultCodesType': FaultCodesType_,
+ 'RetryAfter': RetryAfter,
+ 'AttributedUnsignedLongType': AttributedUnsignedLongType_,
+ 'ProblemHeaderQName': ProblemHeaderQName,
+ 'AttributedQNameType': AttributedQNameType_,
+ 'ProblemIRI': ProblemIRI,
+ 'ProblemAction': ProblemAction,
+ 'ProblemActionType': ProblemActionType_,
+ 'Address': EndpointReferenceType_Address,
+ 'SoapAction': ProblemActionType_SoapAction,
+}
+
+
+def factory(tag, **kwargs):
+ return ELEMENT_BY_TAG[tag](**kwargs)
+
diff --git a/src/saml2/ws/wspol.py b/src/saml2/ws/wspol.py
new file mode 100644
index 00000000..c7dbbe56
--- /dev/null
+++ b/src/saml2/ws/wspol.py
@@ -0,0 +1,241 @@
+#!/usr/bin/env python
+
+#
+# Generated Sun Jun 14 13:35:32 2015 by parse_xsd.py version 0.5.
+#
+
+import saml2
+from saml2 import SamlBase
+
+from saml2.ws import wssec as wsse
+from saml2.ws import wsutil as wsu
+
+NAMESPACE = 'http://schemas.xmlsoap.org/ws/2004/09/policy'
+
+class PolicyReference(SamlBase):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:PolicyReference element """
+
+ c_tag = 'PolicyReference'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['URI'] = ('uri', 'anyURI', True)
+ c_attributes['Digest'] = ('digest', 'base64Binary', False)
+ c_attributes['DigestAlgorithm'] = ('digest_algorithm', 'anyURI', False)
+
+ def __init__(self,
+ uri=None,
+ digest=None,
+ digest_algorithm='http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc',
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.uri=uri
+ self.digest=digest
+ self.digest_algorithm=digest_algorithm
+
+def policy_reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(PolicyReference, xml_string)
+
+
+class AppliesTo(SamlBase):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:AppliesTo element """
+
+ c_tag = 'AppliesTo'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def applies_to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(AppliesTo, xml_string)
+
+
+class PolicyAttachment(SamlBase):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:PolicyAttachment element """
+
+ c_tag = 'PolicyAttachment'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}AppliesTo'] = ('applies_to', AppliesTo)
+ c_cardinality['policy'] = {"min":0}
+ c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}PolicyReference'] = ('policy_reference', [PolicyReference])
+ c_cardinality['policy_reference'] = {"min":0}
+ c_child_order.extend(['applies_to', 'policy', 'policy_reference'])
+
+ def __init__(self,
+ applies_to=None,
+ policy=None,
+ policy_reference=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.applies_to=applies_to
+ self.policy=policy or []
+ self.policy_reference=policy_reference or []
+
+def policy_attachment_from_string(xml_string):
+ return saml2.create_class_from_xml_string(PolicyAttachment, xml_string)
+
+
+class OperatorContentType_(SamlBase):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:OperatorContentType element """
+
+ c_tag = 'OperatorContentType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_cardinality['policy'] = {"min":0}
+ c_cardinality['all'] = {"min":0}
+ c_cardinality['exactly_one'] = {"min":0}
+ c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}PolicyReference'] = ('policy_reference', [PolicyReference])
+ c_cardinality['policy_reference'] = {"min":0}
+ c_child_order.extend(['policy', 'all', 'exactly_one', 'policy_reference'])
+
+ def __init__(self,
+ policy=None,
+ all=None,
+ exactly_one=None,
+ policy_reference=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.policy=policy or []
+ self.all=all or []
+ self.exactly_one=exactly_one or []
+ self.policy_reference=policy_reference or []
+
+def operator_content_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(OperatorContentType_, xml_string)
+
+
+class Policy(OperatorContentType_):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:Policy element """
+
+ c_tag = 'Policy'
+ c_namespace = NAMESPACE
+ c_children = OperatorContentType_.c_children.copy()
+ c_attributes = OperatorContentType_.c_attributes.copy()
+ c_child_order = OperatorContentType_.c_child_order[:]
+ c_cardinality = OperatorContentType_.c_cardinality.copy()
+ c_attributes['Name'] = ('name', 'anyURI', False)
+ c_attributes['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id'] = ('Id', 'tns:OperatorContentType', False)
+
+ def __init__(self,
+ name=None,
+ Id=None,
+ policy=None,
+ all=None,
+ exactly_one=None,
+ policy_reference=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ OperatorContentType_.__init__(self,
+ policy=policy,
+ all=all,
+ exactly_one=exactly_one,
+ policy_reference=policy_reference,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.name=name
+ self.Id=Id
+
+def policy_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Policy, xml_string)
+
+
+class All(OperatorContentType_):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:All element """
+
+ c_tag = 'All'
+ c_namespace = NAMESPACE
+ c_children = OperatorContentType_.c_children.copy()
+ c_attributes = OperatorContentType_.c_attributes.copy()
+ c_child_order = OperatorContentType_.c_child_order[:]
+ c_cardinality = OperatorContentType_.c_cardinality.copy()
+
+def all_from_string(xml_string):
+ return saml2.create_class_from_xml_string(All, xml_string)
+
+
+class ExactlyOne(OperatorContentType_):
+ """The http://schemas.xmlsoap.org/ws/2004/09/policy:ExactlyOne element """
+
+ c_tag = 'ExactlyOne'
+ c_namespace = NAMESPACE
+ c_children = OperatorContentType_.c_children.copy()
+ c_attributes = OperatorContentType_.c_attributes.copy()
+ c_child_order = OperatorContentType_.c_child_order[:]
+ c_cardinality = OperatorContentType_.c_cardinality.copy()
+
+def exactly_one_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ExactlyOne, xml_string)
+
+PolicyAttachment.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'] = ('policy', [Policy])
+OperatorContentType_.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'] = ('policy', [Policy])
+Policy.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'] = ('policy', [Policy])
+ExactlyOne.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'] = ('policy', [Policy])
+All.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'] = ('policy', [Policy])
+OperatorContentType_.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}All'] = ('all', [All])
+Policy.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}All'] = ('all', [All])
+ExactlyOne.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}All'] = ('all', [All])
+All.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}All'] = ('all', [All])
+OperatorContentType_.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}ExactlyOne'] = ('exactly_one', [ExactlyOne])
+Policy.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}ExactlyOne'] = ('exactly_one', [ExactlyOne])
+ExactlyOne.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}ExactlyOne'] = ('exactly_one', [ExactlyOne])
+All.c_children['{http://schemas.xmlsoap.org/ws/2004/09/policy}ExactlyOne'] = ('exactly_one', [ExactlyOne])
+
+ELEMENT_FROM_STRING = {
+ Policy.c_tag: policy_from_string,
+ All.c_tag: all_from_string,
+ ExactlyOne.c_tag: exactly_one_from_string,
+ OperatorContentType_.c_tag: operator_content_type__from_string,
+ PolicyReference.c_tag: policy_reference_from_string,
+ PolicyAttachment.c_tag: policy_attachment_from_string,
+ AppliesTo.c_tag: applies_to_from_string,
+}
+
+ELEMENT_BY_TAG = {
+ 'Policy': Policy,
+ 'All': All,
+ 'ExactlyOne': ExactlyOne,
+ 'OperatorContentType': OperatorContentType_,
+ 'PolicyReference': PolicyReference,
+ 'PolicyAttachment': PolicyAttachment,
+ 'AppliesTo': AppliesTo,
+}
+
+
+def factory(tag, **kwargs):
+ return ELEMENT_BY_TAG[tag](**kwargs)
+
diff --git a/src/saml2/ws/wssec.py b/src/saml2/ws/wssec.py
new file mode 100644
index 00000000..7a1c4728
--- /dev/null
+++ b/src/saml2/ws/wssec.py
@@ -0,0 +1,546 @@
+#!/usr/bin/env python
+
+#
+# Generated Sun Jun 14 13:29:15 2015 by parse_xsd.py version 0.5.
+#
+
+import saml2
+from saml2 import SamlBase
+
+from saml2 import xmldsig as ds
+from saml2.schema import soapenv
+from saml2.ws import wsutil as wsu
+
+NAMESPACE = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
+
+class AttributedString_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:AttributedString element """
+
+ c_tag = 'AttributedString'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'string'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id'] = ('Id', 'string', False)
+
+ def __init__(self,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.Id=Id
+
+def attributed_string__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedString_, xml_string)
+
+class PasswordString_(AttributedString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:PasswordString element """
+
+ c_tag = 'PasswordString'
+ c_namespace = NAMESPACE
+ c_children = AttributedString_.c_children.copy()
+ c_attributes = AttributedString_.c_attributes.copy()
+ c_child_order = AttributedString_.c_child_order[:]
+ c_cardinality = AttributedString_.c_cardinality.copy()
+ c_attributes['Type'] = ('type', 'anyURI', False)
+
+ def __init__(self,
+ type=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ AttributedString_.__init__(self,
+ Id=Id,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.type=type
+
+def password_string__from_string(xml_string):
+ return saml2.create_class_from_xml_string(PasswordString_, xml_string)
+
+class EncodedString_(AttributedString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:EncodedString element """
+
+ c_tag = 'EncodedString'
+ c_namespace = NAMESPACE
+ c_children = AttributedString_.c_children.copy()
+ c_attributes = AttributedString_.c_attributes.copy()
+ c_child_order = AttributedString_.c_child_order[:]
+ c_cardinality = AttributedString_.c_cardinality.copy()
+ c_attributes['EncodingType'] = ('encoding_type', 'anyURI', False)
+
+ def __init__(self,
+ encoding_type=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ AttributedString_.__init__(self,
+ Id=Id,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.encoding_type=encoding_type
+
+def encoded_string__from_string(xml_string):
+ return saml2.create_class_from_xml_string(EncodedString_, xml_string)
+
+class UsernameTokenType_Username(AttributedString_):
+
+ c_tag = 'Username'
+ c_namespace = NAMESPACE
+ c_children = AttributedString_.c_children.copy()
+ c_attributes = AttributedString_.c_attributes.copy()
+ c_child_order = AttributedString_.c_child_order[:]
+ c_cardinality = AttributedString_.c_cardinality.copy()
+
+def username_token_type__username_from_string(xml_string):
+ return saml2.create_class_from_xml_string(UsernameTokenType_Username, xml_string)
+
+class UsernameTokenType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:UsernameTokenType element """
+
+ c_tag = 'UsernameTokenType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Username'] = ('username', UsernameTokenType_Username)
+ c_attributes['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id'] = ('Id', 'None', False)
+ c_child_order.extend(['username'])
+
+ def __init__(self,
+ username=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.username=username
+ self.Id=Id
+
+def username_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(UsernameTokenType_, xml_string)
+
+class BinarySecurityTokenType_(EncodedString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:BinarySecurityTokenType element """
+
+ c_tag = 'BinarySecurityTokenType'
+ c_namespace = NAMESPACE
+ c_children = EncodedString_.c_children.copy()
+ c_attributes = EncodedString_.c_attributes.copy()
+ c_child_order = EncodedString_.c_child_order[:]
+ c_cardinality = EncodedString_.c_cardinality.copy()
+ c_attributes['ValueType'] = ('value_type', 'anyURI', False)
+
+ def __init__(self,
+ value_type=None,
+ encoding_type=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ EncodedString_.__init__(self,
+ encoding_type=encoding_type,
+ Id=Id,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.value_type=value_type
+
+def binary_security_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecurityTokenType_, xml_string)
+
+class KeyIdentifierType_(EncodedString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:KeyIdentifierType element """
+
+ c_tag = 'KeyIdentifierType'
+ c_namespace = NAMESPACE
+ c_children = EncodedString_.c_children.copy()
+ c_attributes = EncodedString_.c_attributes.copy()
+ c_child_order = EncodedString_.c_child_order[:]
+ c_cardinality = EncodedString_.c_cardinality.copy()
+ c_attributes['ValueType'] = ('value_type', 'anyURI', False)
+
+ def __init__(self,
+ value_type=None,
+ encoding_type=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ EncodedString_.__init__(self,
+ encoding_type=encoding_type,
+ Id=Id,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.value_type=value_type
+
+def key_identifier_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyIdentifierType_, xml_string)
+
+class TUsage_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:tUsage element """
+
+ c_tag = 'tUsage'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def t_usage__from_string(xml_string):
+ return saml2.create_class_from_xml_string(TUsage_, xml_string)
+
+class ReferenceType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:ReferenceType element """
+
+ c_tag = 'ReferenceType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['URI'] = ('uri', 'anyURI', False)
+ c_attributes['ValueType'] = ('value_type', 'anyURI', False)
+
+ def __init__(self,
+ uri=None,
+ value_type=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.uri=uri
+ self.value_type=value_type
+
+def reference_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ReferenceType_, xml_string)
+
+class EmbeddedType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:EmbeddedType element """
+
+ c_tag = 'EmbeddedType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['ValueType'] = ('value_type', 'anyURI', False)
+
+ def __init__(self,
+ value_type=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.value_type=value_type
+
+def embedded_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(EmbeddedType_, xml_string)
+
+class SecurityTokenReferenceType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:SecurityTokenReferenceType element """
+
+ c_tag = 'SecurityTokenReferenceType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id'] = ('Id', 'None', False)
+ c_attributes['Usage'] = ('Usage', 'None', False)
+
+ def __init__(self,
+ Id=None,
+ Usage=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.Id=Id
+ self.Usage=Usage
+
+def security_token_reference_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(SecurityTokenReferenceType_, xml_string)
+
+class SecurityHeaderType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:SecurityHeaderType element """
+
+ c_tag = 'SecurityHeaderType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def security_header_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(SecurityHeaderType_, xml_string)
+
+class TransformationParametersType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:TransformationParametersType element """
+
+ c_tag = 'TransformationParametersType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def transformation_parameters_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(TransformationParametersType_, xml_string)
+
+class UsernameToken(UsernameTokenType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:UsernameToken element """
+
+ c_tag = 'UsernameToken'
+ c_namespace = NAMESPACE
+ c_children = UsernameTokenType_.c_children.copy()
+ c_attributes = UsernameTokenType_.c_attributes.copy()
+ c_child_order = UsernameTokenType_.c_child_order[:]
+ c_cardinality = UsernameTokenType_.c_cardinality.copy()
+
+def username_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(UsernameToken, xml_string)
+
+class BinarySecurityToken(BinarySecurityTokenType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:BinarySecurityToken element """
+
+ c_tag = 'BinarySecurityToken'
+ c_namespace = NAMESPACE
+ c_children = BinarySecurityTokenType_.c_children.copy()
+ c_attributes = BinarySecurityTokenType_.c_attributes.copy()
+ c_child_order = BinarySecurityTokenType_.c_child_order[:]
+ c_cardinality = BinarySecurityTokenType_.c_cardinality.copy()
+
+def binary_security_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecurityToken, xml_string)
+
+
+class Reference(ReferenceType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Reference element """
+
+ c_tag = 'Reference'
+ c_namespace = NAMESPACE
+ c_children = ReferenceType_.c_children.copy()
+ c_attributes = ReferenceType_.c_attributes.copy()
+ c_child_order = ReferenceType_.c_child_order[:]
+ c_cardinality = ReferenceType_.c_cardinality.copy()
+
+def reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Reference, xml_string)
+
+
+class Embedded(EmbeddedType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Embedded element """
+
+ c_tag = 'Embedded'
+ c_namespace = NAMESPACE
+ c_children = EmbeddedType_.c_children.copy()
+ c_attributes = EmbeddedType_.c_attributes.copy()
+ c_child_order = EmbeddedType_.c_child_order[:]
+ c_cardinality = EmbeddedType_.c_cardinality.copy()
+
+def embedded_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Embedded, xml_string)
+
+
+class KeyIdentifier(KeyIdentifierType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:KeyIdentifier element """
+
+ c_tag = 'KeyIdentifier'
+ c_namespace = NAMESPACE
+ c_children = KeyIdentifierType_.c_children.copy()
+ c_attributes = KeyIdentifierType_.c_attributes.copy()
+ c_child_order = KeyIdentifierType_.c_child_order[:]
+ c_cardinality = KeyIdentifierType_.c_cardinality.copy()
+
+def key_identifier_from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyIdentifier, xml_string)
+
+
+class SecurityTokenReference(SecurityTokenReferenceType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:SecurityTokenReference element """
+
+ c_tag = 'SecurityTokenReference'
+ c_namespace = NAMESPACE
+ c_children = SecurityTokenReferenceType_.c_children.copy()
+ c_attributes = SecurityTokenReferenceType_.c_attributes.copy()
+ c_child_order = SecurityTokenReferenceType_.c_child_order[:]
+ c_cardinality = SecurityTokenReferenceType_.c_cardinality.copy()
+
+def security_token_reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(SecurityTokenReference, xml_string)
+
+
+class Security(SecurityHeaderType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Security element """
+
+ c_tag = 'Security'
+ c_namespace = NAMESPACE
+ c_children = SecurityHeaderType_.c_children.copy()
+ c_attributes = SecurityHeaderType_.c_attributes.copy()
+ c_child_order = SecurityHeaderType_.c_child_order[:]
+ c_cardinality = SecurityHeaderType_.c_cardinality.copy()
+
+def security_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Security, xml_string)
+
+
+class TransformationParameters(TransformationParametersType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:TransformationParameters element """
+
+ c_tag = 'TransformationParameters'
+ c_namespace = NAMESPACE
+ c_children = TransformationParametersType_.c_children.copy()
+ c_attributes = TransformationParametersType_.c_attributes.copy()
+ c_child_order = TransformationParametersType_.c_child_order[:]
+ c_cardinality = TransformationParametersType_.c_cardinality.copy()
+
+def transformation_parameters_from_string(xml_string):
+ return saml2.create_class_from_xml_string(TransformationParameters, xml_string)
+
+
+class Password(PasswordString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Password element """
+
+ c_tag = 'Password'
+ c_namespace = NAMESPACE
+ c_children = PasswordString_.c_children.copy()
+ c_attributes = PasswordString_.c_attributes.copy()
+ c_child_order = PasswordString_.c_child_order[:]
+ c_cardinality = PasswordString_.c_cardinality.copy()
+
+def password_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Password, xml_string)
+
+
+class Nonce(EncodedString_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Nonce element """
+
+ c_tag = 'Nonce'
+ c_namespace = NAMESPACE
+ c_children = EncodedString_.c_children.copy()
+ c_attributes = EncodedString_.c_attributes.copy()
+ c_child_order = EncodedString_.c_child_order[:]
+ c_cardinality = EncodedString_.c_cardinality.copy()
+
+def nonce_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Nonce, xml_string)
+
+
+class FaultcodeEnum_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:FaultcodeEnum element """
+
+ c_tag = 'FaultcodeEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xsd:QName', 'enumeration': ['wsse:UnsupportedSecurityToken', 'wsse:UnsupportedAlgorithm', 'wsse:InvalidSecurity', 'wsse:InvalidSecurityToken', 'wsse:FailedAuthentication', 'wsse:FailedCheck', 'wsse:SecurityTokenUnavailable']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def faultcode_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(FaultcodeEnum_, xml_string)
+
+
+#..................
+('#', [])
+ELEMENT_FROM_STRING = {
+ AttributedString_.c_tag: attributed_string__from_string,
+ PasswordString_.c_tag: password_string__from_string,
+ EncodedString_.c_tag: encoded_string__from_string,
+ UsernameTokenType_.c_tag: username_token_type__from_string,
+ BinarySecurityTokenType_.c_tag: binary_security_token_type__from_string,
+ KeyIdentifierType_.c_tag: key_identifier_type__from_string,
+ TUsage_.c_tag: t_usage__from_string,
+ ReferenceType_.c_tag: reference_type__from_string,
+ EmbeddedType_.c_tag: embedded_type__from_string,
+ SecurityTokenReferenceType_.c_tag: security_token_reference_type__from_string,
+ SecurityHeaderType_.c_tag: security_header_type__from_string,
+ TransformationParametersType_.c_tag: transformation_parameters_type__from_string,
+ UsernameToken.c_tag: username_token_from_string,
+ BinarySecurityToken.c_tag: binary_security_token_from_string,
+ Reference.c_tag: reference_from_string,
+ Embedded.c_tag: embedded_from_string,
+ KeyIdentifier.c_tag: key_identifier_from_string,
+ SecurityTokenReference.c_tag: security_token_reference_from_string,
+ Security.c_tag: security_from_string,
+ TransformationParameters.c_tag: transformation_parameters_from_string,
+ Password.c_tag: password_from_string,
+ Nonce.c_tag: nonce_from_string,
+ FaultcodeEnum_.c_tag: faultcode_enum__from_string,
+ UsernameTokenType_Username.c_tag: username_token_type__username_from_string,
+}
+
+ELEMENT_BY_TAG = {
+ 'AttributedString': AttributedString_,
+ 'PasswordString': PasswordString_,
+ 'EncodedString': EncodedString_,
+ 'UsernameTokenType': UsernameTokenType_,
+ 'BinarySecurityTokenType': BinarySecurityTokenType_,
+ 'KeyIdentifierType': KeyIdentifierType_,
+ 'tUsage': TUsage_,
+ 'ReferenceType': ReferenceType_,
+ 'EmbeddedType': EmbeddedType_,
+ 'SecurityTokenReferenceType': SecurityTokenReferenceType_,
+ 'SecurityHeaderType': SecurityHeaderType_,
+ 'TransformationParametersType': TransformationParametersType_,
+ 'UsernameToken': UsernameToken,
+ 'BinarySecurityToken': BinarySecurityToken,
+ 'Reference': Reference,
+ 'Embedded': Embedded,
+ 'KeyIdentifier': KeyIdentifier,
+ 'SecurityTokenReference': SecurityTokenReference,
+ 'Security': Security,
+ 'TransformationParameters': TransformationParameters,
+ 'Password': Password,
+ 'Nonce': Nonce,
+ 'FaultcodeEnum': FaultcodeEnum_,
+ 'Username': UsernameTokenType_Username,
+}
+
+
+def factory(tag, **kwargs):
+ return ELEMENT_BY_TAG[tag](**kwargs)
+
diff --git a/src/saml2/ws/wstrust.py b/src/saml2/ws/wstrust.py
new file mode 100644
index 00000000..eb8c944c
--- /dev/null
+++ b/src/saml2/ws/wstrust.py
@@ -0,0 +1,1802 @@
+#!/usr/bin/env python
+
+#
+# Generated Sun Jun 14 13:41:29 2015 by parse_xsd.py version 0.5.
+#
+
+import saml2
+from saml2 import SamlBase
+
+from saml2.ws import wsaddr as wsa
+from saml2.ws import wssec as wsse
+from saml2.ws import wsutil as wsu
+from saml2.ws import wspol as wsp
+
+NAMESPACE = 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/'
+
+class RequestSecurityTokenType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenType element """
+
+ c_tag = 'RequestSecurityTokenType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Context'] = ('context', 'anyURI', False)
+
+ def __init__(self,
+ context=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.context=context
+
+def request_security_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenType_, xml_string)
+
+
+class TokenType(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:TokenType element """
+
+ c_tag = 'TokenType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def token_type_from_string(xml_string):
+ return saml2.create_class_from_xml_string(TokenType, xml_string)
+
+
+class RequestTypeOpenEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestTypeOpenEnum element """
+
+ c_tag = 'RequestTypeOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def request_type_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestTypeOpenEnum_, xml_string)
+
+
+class RequestTypeEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestTypeEnum element """
+
+ c_tag = 'RequestTypeEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Renew', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Cancel', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/STSCancel', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Validate']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def request_type_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestTypeEnum_, xml_string)
+
+
+class RequestSecurityTokenResponseType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseType element """
+
+ c_tag = 'RequestSecurityTokenResponseType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Context'] = ('context', 'anyURI', False)
+
+ def __init__(self,
+ context=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.context=context
+
+def request_security_token_response_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenResponseType_, xml_string)
+
+
+class RequestedSecurityTokenType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedSecurityTokenType element """
+
+ c_tag = 'RequestedSecurityTokenType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def requested_security_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedSecurityTokenType_, xml_string)
+
+
+class BinarySecretTypeEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretTypeEnum element """
+
+ c_tag = 'BinarySecretTypeEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/AsymmetricKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Nonce']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def binary_secret_type_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecretTypeEnum_, xml_string)
+
+
+class BinarySecretTypeOpenEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretTypeOpenEnum element """
+
+ c_tag = 'BinarySecretTypeOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def binary_secret_type_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecretTypeOpenEnum_, xml_string)
+
+
+class ClaimsType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ClaimsType element """
+
+ c_tag = 'ClaimsType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Dialect'] = ('dialect', 'anyURI', False)
+
+ def __init__(self,
+ dialect=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.dialect=dialect
+
+def claims_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ClaimsType_, xml_string)
+
+
+class EntropyType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EntropyType element """
+
+ c_tag = 'EntropyType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def entropy_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(EntropyType_, xml_string)
+
+
+class LifetimeType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:LifetimeType element """
+
+ c_tag = 'LifetimeType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Created'] = ('created', wsu.Created)
+ c_cardinality['created'] = {"min":0, "max":1}
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Expires'] = ('expires', wsu.Expires)
+ c_cardinality['expires'] = {"min":0, "max":1}
+ c_child_order.extend(['created', 'expires'])
+
+ def __init__(self,
+ created=None,
+ expires=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.created=created
+ self.expires=expires
+
+def lifetime_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(LifetimeType_, xml_string)
+
+
+class RequestSecurityTokenCollectionType_RequestSecurityToken(RequestSecurityTokenType_):
+
+ c_tag = 'RequestSecurityToken'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenType_.c_children.copy()
+ c_attributes = RequestSecurityTokenType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenType_.c_cardinality.copy()
+
+def request_security_token_collection_type__request_security_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenCollectionType_RequestSecurityToken, xml_string)
+
+
+class RequestSecurityTokenCollectionType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenCollectionType element """
+
+ c_tag = 'RequestSecurityTokenCollectionType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}RequestSecurityToken'] = ('request_security_token', [RequestSecurityTokenCollectionType_RequestSecurityToken])
+ c_cardinality['request_security_token'] = {"min":2}
+ c_child_order.extend(['request_security_token'])
+
+ def __init__(self,
+ request_security_token=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.request_security_token=request_security_token or []
+
+def request_security_token_collection_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenCollectionType_, xml_string)
+
+
+class ComputedKeyEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyEnum element """
+
+ c_tag = 'ComputedKeyEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/CK/PSHA1', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/CK/HASH']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def computed_key_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ComputedKeyEnum_, xml_string)
+
+
+class ComputedKeyOpenEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyOpenEnum element """
+
+ c_tag = 'ComputedKeyOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def computed_key_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ComputedKeyOpenEnum_, xml_string)
+
+
+class RequestedReferenceType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedReferenceType element """
+
+ c_tag = 'RequestedReferenceType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}SecurityTokenReference'] = ('security_token_reference', wsse.SecurityTokenReference)
+ c_child_order.extend(['security_token_reference'])
+
+ def __init__(self,
+ security_token_reference=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.security_token_reference=security_token_reference
+
+def requested_reference_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedReferenceType_, xml_string)
+
+
+class RequestedProofTokenType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedProofTokenType element """
+
+ c_tag = 'RequestedProofTokenType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def requested_proof_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedProofTokenType_, xml_string)
+
+
+class RenewTargetType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewTargetType element """
+
+ c_tag = 'RenewTargetType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def renew_target_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RenewTargetType_, xml_string)
+
+
+class AllowPostdatingType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AllowPostdatingType element """
+
+ c_tag = 'AllowPostdatingType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def allow_postdating_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AllowPostdatingType_, xml_string)
+
+
+class RenewingType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewingType element """
+
+ c_tag = 'RenewingType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Allow'] = ('allow', 'boolean', False)
+ c_attributes['OK'] = ('ok', 'boolean', False)
+
+ def __init__(self,
+ allow=None,
+ ok=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.allow=allow
+ self.ok=ok
+
+def renewing_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RenewingType_, xml_string)
+
+
+class CancelTargetType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CancelTargetType element """
+
+ c_tag = 'CancelTargetType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def cancel_target_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(CancelTargetType_, xml_string)
+
+
+class RequestedTokenCancelledType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedTokenCancelledType element """
+
+ c_tag = 'RequestedTokenCancelledType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def requested_token_cancelled_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedTokenCancelledType_, xml_string)
+
+
+class ValidateTargetType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ValidateTargetType element """
+
+ c_tag = 'ValidateTargetType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def validate_target_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ValidateTargetType_, xml_string)
+
+
+class StatusCodeEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusCodeEnum element """
+
+ c_tag = 'StatusCodeEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/status/valid', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/status/invalid']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def status_code_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(StatusCodeEnum_, xml_string)
+
+
+class StatusCodeOpenEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusCodeOpenEnum element """
+
+ c_tag = 'StatusCodeOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def status_code_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(StatusCodeOpenEnum_, xml_string)
+
+
+class Challenge(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Challenge element """
+
+ c_tag = 'Challenge'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'string'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def challenge_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Challenge, xml_string)
+
+
+class BinaryExchangeType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinaryExchangeType element """
+
+ c_tag = 'BinaryExchangeType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'string'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['ValueType'] = ('value_type', 'anyURI', True)
+ c_attributes['EncodingType'] = ('encoding_type', 'anyURI', True)
+
+ def __init__(self,
+ value_type=None,
+ encoding_type=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.value_type=value_type
+ self.encoding_type=encoding_type
+
+def binary_exchange_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinaryExchangeType_, xml_string)
+
+
+class RequestKETType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestKETType element """
+
+ c_tag = 'RequestKETType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def request_ket_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestKETType_, xml_string)
+
+
+class KeyExchangeTokenType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyExchangeTokenType element """
+
+ c_tag = 'KeyExchangeTokenType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def key_exchange_token_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyExchangeTokenType_, xml_string)
+
+
+class CombinedHash(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CombinedHash element """
+
+ c_tag = 'CombinedHash'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'base64Binary'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def combined_hash_from_string(xml_string):
+ return saml2.create_class_from_xml_string(CombinedHash, xml_string)
+
+
+class OnBehalfOfType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:OnBehalfOfType element """
+
+ c_tag = 'OnBehalfOfType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def on_behalf_of_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(OnBehalfOfType_, xml_string)
+
+
+class Issuer(wsa.EndpointReferenceType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Issuer element """
+
+ c_tag = 'Issuer'
+ c_namespace = NAMESPACE
+ c_children = wsa.EndpointReferenceType_.c_children.copy()
+ c_attributes = wsa.EndpointReferenceType_.c_attributes.copy()
+ c_child_order = wsa.EndpointReferenceType_.c_child_order[:]
+ c_cardinality = wsa.EndpointReferenceType_.c_cardinality.copy()
+
+def issuer_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Issuer, xml_string)
+
+
+class AuthenticationType(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AuthenticationType element """
+
+ c_tag = 'AuthenticationType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def authentication_type_from_string(xml_string):
+ return saml2.create_class_from_xml_string(AuthenticationType, xml_string)
+
+
+class KeyTypeEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyTypeEnum element """
+
+ c_tag = 'KeyTypeEnum'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey', 'http://docs.oasis-open.org/wssx/wstrust/200512/Bearer']}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def key_type_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyTypeEnum_, xml_string)
+
+
+class KeyTypeOpenEnum_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyTypeOpenEnum element """
+
+ c_tag = 'KeyTypeOpenEnum'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def key_type_open_enum__from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyTypeOpenEnum_, xml_string)
+
+
+class KeySize(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeySize element """
+
+ c_tag = 'KeySize'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'unsignedInt'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def key_size_from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeySize, xml_string)
+
+
+class SignatureAlgorithm(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignatureAlgorithm element """
+
+ c_tag = 'SignatureAlgorithm'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def signature_algorithm_from_string(xml_string):
+ return saml2.create_class_from_xml_string(SignatureAlgorithm, xml_string)
+
+
+class EncryptionAlgorithm(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptionAlgorithm element """
+
+ c_tag = 'EncryptionAlgorithm'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def encryption_algorithm_from_string(xml_string):
+ return saml2.create_class_from_xml_string(EncryptionAlgorithm, xml_string)
+
+
+class CanonicalizationAlgorithm(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CanonicalizationAlgorithm element """
+
+ c_tag = 'CanonicalizationAlgorithm'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def canonicalization_algorithm_from_string(xml_string):
+ return saml2.create_class_from_xml_string(CanonicalizationAlgorithm, xml_string)
+
+
+class ComputedKeyAlgorithm(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyAlgorithm element """
+
+ c_tag = 'ComputedKeyAlgorithm'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def computed_key_algorithm_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ComputedKeyAlgorithm, xml_string)
+
+
+class EncryptionType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptionType element """
+
+ c_tag = 'EncryptionType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def encryption_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(EncryptionType_, xml_string)
+
+
+class ProofEncryptionType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ProofEncryptionType element """
+
+ c_tag = 'ProofEncryptionType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def proof_encryption_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProofEncryptionType_, xml_string)
+
+
+class UseKeyType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:UseKeyType element """
+
+ c_tag = 'UseKeyType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Sig'] = ('sig', 'anyURI', False)
+
+ def __init__(self,
+ sig=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.sig=sig
+
+def use_key_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(UseKeyType_, xml_string)
+
+
+class KeyWrapAlgorithm(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyWrapAlgorithm element """
+
+ c_tag = 'KeyWrapAlgorithm'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def key_wrap_algorithm_from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyWrapAlgorithm, xml_string)
+
+
+class SignWith(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignWith element """
+
+ c_tag = 'SignWith'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def sign_with_from_string(xml_string):
+ return saml2.create_class_from_xml_string(SignWith, xml_string)
+
+
+class EncryptWith(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptWith element """
+
+ c_tag = 'EncryptWith'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def encrypt_with_from_string(xml_string):
+ return saml2.create_class_from_xml_string(EncryptWith, xml_string)
+
+
+class DelegateToType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:DelegateToType element """
+
+ c_tag = 'DelegateToType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def delegate_to_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(DelegateToType_, xml_string)
+
+
+class Forwardable(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Forwardable element """
+
+ c_tag = 'Forwardable'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'boolean'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def forwardable_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Forwardable, xml_string)
+
+
+class Delegatable(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Delegatable element """
+
+ c_tag = 'Delegatable'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'boolean'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def delegatable_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Delegatable, xml_string)
+
+
+class ParticipantType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ParticipantType element """
+
+ c_tag = 'ParticipantType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def participant_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ParticipantType_, xml_string)
+
+
+class RequestSecurityToken(RequestSecurityTokenType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityToken element """
+
+ c_tag = 'RequestSecurityToken'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenType_.c_children.copy()
+ c_attributes = RequestSecurityTokenType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenType_.c_cardinality.copy()
+
+def request_security_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityToken, xml_string)
+
+
+class RequestType(RequestTypeOpenEnum_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestType element """
+
+ c_tag = 'RequestType'
+ c_namespace = NAMESPACE
+ c_children = RequestTypeOpenEnum_.c_children.copy()
+ c_attributes = RequestTypeOpenEnum_.c_attributes.copy()
+ c_child_order = RequestTypeOpenEnum_.c_child_order[:]
+ c_cardinality = RequestTypeOpenEnum_.c_cardinality.copy()
+
+def request_type_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestType, xml_string)
+
+
+class RequestSecurityTokenResponse(RequestSecurityTokenResponseType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponse element """
+
+ c_tag = 'RequestSecurityTokenResponse'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenResponseType_.c_children.copy()
+ c_attributes = RequestSecurityTokenResponseType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenResponseType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenResponseType_.c_cardinality.copy()
+
+def request_security_token_response_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenResponse, xml_string)
+
+
+class RequestedSecurityToken(RequestedSecurityTokenType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedSecurityToken element """
+
+ c_tag = 'RequestedSecurityToken'
+ c_namespace = NAMESPACE
+ c_children = RequestedSecurityTokenType_.c_children.copy()
+ c_attributes = RequestedSecurityTokenType_.c_attributes.copy()
+ c_child_order = RequestedSecurityTokenType_.c_child_order[:]
+ c_cardinality = RequestedSecurityTokenType_.c_cardinality.copy()
+
+def requested_security_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedSecurityToken, xml_string)
+
+
+class BinarySecretType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretType element """
+
+ c_tag = 'BinarySecretType'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'base64Binary'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Type'] = ('type', BinarySecretTypeOpenEnum_, False)
+
+ def __init__(self,
+ type=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.type=type
+
+def binary_secret_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecretType_, xml_string)
+
+
+class Claims(ClaimsType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Claims element """
+
+ c_tag = 'Claims'
+ c_namespace = NAMESPACE
+ c_children = ClaimsType_.c_children.copy()
+ c_attributes = ClaimsType_.c_attributes.copy()
+ c_child_order = ClaimsType_.c_child_order[:]
+ c_cardinality = ClaimsType_.c_cardinality.copy()
+
+def claims_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Claims, xml_string)
+
+
+class Entropy(EntropyType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Entropy element """
+
+ c_tag = 'Entropy'
+ c_namespace = NAMESPACE
+ c_children = EntropyType_.c_children.copy()
+ c_attributes = EntropyType_.c_attributes.copy()
+ c_child_order = EntropyType_.c_child_order[:]
+ c_cardinality = EntropyType_.c_cardinality.copy()
+
+def entropy_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Entropy, xml_string)
+
+
+class Lifetime(LifetimeType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Lifetime element """
+
+ c_tag = 'Lifetime'
+ c_namespace = NAMESPACE
+ c_children = LifetimeType_.c_children.copy()
+ c_attributes = LifetimeType_.c_attributes.copy()
+ c_child_order = LifetimeType_.c_child_order[:]
+ c_cardinality = LifetimeType_.c_cardinality.copy()
+
+def lifetime_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Lifetime, xml_string)
+
+
+class RequestSecurityTokenCollection(RequestSecurityTokenCollectionType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenCollection element """
+
+ c_tag = 'RequestSecurityTokenCollection'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenCollectionType_.c_children.copy()
+ c_attributes = RequestSecurityTokenCollectionType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenCollectionType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenCollectionType_.c_cardinality.copy()
+
+def request_security_token_collection_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenCollection, xml_string)
+
+
+class RequestSecurityTokenResponseCollectionType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseCollectionType element """
+
+ c_tag = 'RequestSecurityTokenResponseCollectionType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}RequestSecurityTokenResponse'] = ('request_security_token_response', [RequestSecurityTokenResponse])
+ c_cardinality['request_security_token_response'] = {"min":1}
+ c_child_order.extend(['request_security_token_response'])
+
+ def __init__(self,
+ request_security_token_response=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.request_security_token_response=request_security_token_response or []
+
+def request_security_token_response_collection_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenResponseCollectionType_, xml_string)
+
+
+class ComputedKey(ComputedKeyOpenEnum_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKey element """
+
+ c_tag = 'ComputedKey'
+ c_namespace = NAMESPACE
+ c_children = ComputedKeyOpenEnum_.c_children.copy()
+ c_attributes = ComputedKeyOpenEnum_.c_attributes.copy()
+ c_child_order = ComputedKeyOpenEnum_.c_child_order[:]
+ c_cardinality = ComputedKeyOpenEnum_.c_cardinality.copy()
+
+def computed_key_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ComputedKey, xml_string)
+
+
+class RequestedAttachedReference(RequestedReferenceType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedAttachedReference element """
+
+ c_tag = 'RequestedAttachedReference'
+ c_namespace = NAMESPACE
+ c_children = RequestedReferenceType_.c_children.copy()
+ c_attributes = RequestedReferenceType_.c_attributes.copy()
+ c_child_order = RequestedReferenceType_.c_child_order[:]
+ c_cardinality = RequestedReferenceType_.c_cardinality.copy()
+
+def requested_attached_reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedAttachedReference, xml_string)
+
+
+class RequestedUnattachedReference(RequestedReferenceType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedUnattachedReference element """
+
+ c_tag = 'RequestedUnattachedReference'
+ c_namespace = NAMESPACE
+ c_children = RequestedReferenceType_.c_children.copy()
+ c_attributes = RequestedReferenceType_.c_attributes.copy()
+ c_child_order = RequestedReferenceType_.c_child_order[:]
+ c_cardinality = RequestedReferenceType_.c_cardinality.copy()
+
+def requested_unattached_reference_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedUnattachedReference, xml_string)
+
+
+class RequestedProofToken(RequestedProofTokenType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedProofToken element """
+
+ c_tag = 'RequestedProofToken'
+ c_namespace = NAMESPACE
+ c_children = RequestedProofTokenType_.c_children.copy()
+ c_attributes = RequestedProofTokenType_.c_attributes.copy()
+ c_child_order = RequestedProofTokenType_.c_child_order[:]
+ c_cardinality = RequestedProofTokenType_.c_cardinality.copy()
+
+def requested_proof_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedProofToken, xml_string)
+
+
+class IssuedTokens(RequestSecurityTokenResponseCollectionType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:IssuedTokens element """
+
+ c_tag = 'IssuedTokens'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenResponseCollectionType_.c_children.copy()
+ c_attributes = RequestSecurityTokenResponseCollectionType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenResponseCollectionType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenResponseCollectionType_.c_cardinality.copy()
+
+def issued_tokens_from_string(xml_string):
+ return saml2.create_class_from_xml_string(IssuedTokens, xml_string)
+
+
+class RenewTarget(RenewTargetType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewTarget element """
+
+ c_tag = 'RenewTarget'
+ c_namespace = NAMESPACE
+ c_children = RenewTargetType_.c_children.copy()
+ c_attributes = RenewTargetType_.c_attributes.copy()
+ c_child_order = RenewTargetType_.c_child_order[:]
+ c_cardinality = RenewTargetType_.c_cardinality.copy()
+
+def renew_target_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RenewTarget, xml_string)
+
+
+class AllowPostdating(AllowPostdatingType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AllowPostdating element """
+
+ c_tag = 'AllowPostdating'
+ c_namespace = NAMESPACE
+ c_children = AllowPostdatingType_.c_children.copy()
+ c_attributes = AllowPostdatingType_.c_attributes.copy()
+ c_child_order = AllowPostdatingType_.c_child_order[:]
+ c_cardinality = AllowPostdatingType_.c_cardinality.copy()
+
+def allow_postdating_from_string(xml_string):
+ return saml2.create_class_from_xml_string(AllowPostdating, xml_string)
+
+
+class Renewing(RenewingType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Renewing element """
+
+ c_tag = 'Renewing'
+ c_namespace = NAMESPACE
+ c_children = RenewingType_.c_children.copy()
+ c_attributes = RenewingType_.c_attributes.copy()
+ c_child_order = RenewingType_.c_child_order[:]
+ c_cardinality = RenewingType_.c_cardinality.copy()
+
+def renewing_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Renewing, xml_string)
+
+
+class CancelTarget(CancelTargetType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CancelTarget element """
+
+ c_tag = 'CancelTarget'
+ c_namespace = NAMESPACE
+ c_children = CancelTargetType_.c_children.copy()
+ c_attributes = CancelTargetType_.c_attributes.copy()
+ c_child_order = CancelTargetType_.c_child_order[:]
+ c_cardinality = CancelTargetType_.c_cardinality.copy()
+
+def cancel_target_from_string(xml_string):
+ return saml2.create_class_from_xml_string(CancelTarget, xml_string)
+
+
+class RequestedTokenCancelled(RequestedTokenCancelledType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedTokenCancelled element """
+
+ c_tag = 'RequestedTokenCancelled'
+ c_namespace = NAMESPACE
+ c_children = RequestedTokenCancelledType_.c_children.copy()
+ c_attributes = RequestedTokenCancelledType_.c_attributes.copy()
+ c_child_order = RequestedTokenCancelledType_.c_child_order[:]
+ c_cardinality = RequestedTokenCancelledType_.c_cardinality.copy()
+
+def requested_token_cancelled_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestedTokenCancelled, xml_string)
+
+
+class ValidateTarget(ValidateTargetType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ValidateTarget element """
+
+ c_tag = 'ValidateTarget'
+ c_namespace = NAMESPACE
+ c_children = ValidateTargetType_.c_children.copy()
+ c_attributes = ValidateTargetType_.c_attributes.copy()
+ c_child_order = ValidateTargetType_.c_child_order[:]
+ c_cardinality = ValidateTargetType_.c_cardinality.copy()
+
+def validate_target_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ValidateTarget, xml_string)
+
+
+class StatusType_Code(StatusCodeOpenEnum_):
+
+ c_tag = 'Code'
+ c_namespace = NAMESPACE
+ c_children = StatusCodeOpenEnum_.c_children.copy()
+ c_attributes = StatusCodeOpenEnum_.c_attributes.copy()
+ c_child_order = StatusCodeOpenEnum_.c_child_order[:]
+ c_cardinality = StatusCodeOpenEnum_.c_cardinality.copy()
+
+def status_type__code_from_string(xml_string):
+ return saml2.create_class_from_xml_string(StatusType_Code, xml_string)
+
+
+class StatusType_Reason(SamlBase):
+
+ c_tag = 'Reason'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'string'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def status_type__reason_from_string(xml_string):
+ return saml2.create_class_from_xml_string(StatusType_Reason, xml_string)
+
+
+class StatusType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusType element """
+
+ c_tag = 'StatusType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Code'] = ('code', StatusType_Code)
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Reason'] = ('reason', StatusType_Reason)
+ c_cardinality['reason'] = {"min":0, "max":1}
+ c_child_order.extend(['code', 'reason'])
+
+ def __init__(self,
+ code=None,
+ reason=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.code=code
+ self.reason=reason
+
+def status_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(StatusType_, xml_string)
+
+
+class SignChallengeType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallengeType element """
+
+ c_tag = 'SignChallengeType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Challenge'] = ('challenge', Challenge)
+ c_child_order.extend(['challenge'])
+
+ def __init__(self,
+ challenge=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.challenge=challenge
+
+def sign_challenge_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(SignChallengeType_, xml_string)
+
+
+class BinaryExchange(BinaryExchangeType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinaryExchange element """
+
+ c_tag = 'BinaryExchange'
+ c_namespace = NAMESPACE
+ c_children = BinaryExchangeType_.c_children.copy()
+ c_attributes = BinaryExchangeType_.c_attributes.copy()
+ c_child_order = BinaryExchangeType_.c_child_order[:]
+ c_cardinality = BinaryExchangeType_.c_cardinality.copy()
+
+def binary_exchange_from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinaryExchange, xml_string)
+
+
+class RequestKET(RequestKETType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestKET element """
+
+ c_tag = 'RequestKET'
+ c_namespace = NAMESPACE
+ c_children = RequestKETType_.c_children.copy()
+ c_attributes = RequestKETType_.c_attributes.copy()
+ c_child_order = RequestKETType_.c_child_order[:]
+ c_cardinality = RequestKETType_.c_cardinality.copy()
+
+def request_ket_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestKET, xml_string)
+
+
+class KeyExchangeToken(KeyExchangeTokenType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyExchangeToken element """
+
+ c_tag = 'KeyExchangeToken'
+ c_namespace = NAMESPACE
+ c_children = KeyExchangeTokenType_.c_children.copy()
+ c_attributes = KeyExchangeTokenType_.c_attributes.copy()
+ c_child_order = KeyExchangeTokenType_.c_child_order[:]
+ c_cardinality = KeyExchangeTokenType_.c_cardinality.copy()
+
+def key_exchange_token_from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyExchangeToken, xml_string)
+
+
+class AuthenticatorType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AuthenticatorType element """
+
+ c_tag = 'AuthenticatorType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}CombinedHash'] = ('combined_hash', CombinedHash)
+ c_cardinality['combined_hash'] = {"min":0, "max":1}
+ c_child_order.extend(['combined_hash'])
+
+ def __init__(self,
+ combined_hash=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.combined_hash=combined_hash
+
+def authenticator_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AuthenticatorType_, xml_string)
+
+
+class OnBehalfOf(OnBehalfOfType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:OnBehalfOf element """
+
+ c_tag = 'OnBehalfOf'
+ c_namespace = NAMESPACE
+ c_children = OnBehalfOfType_.c_children.copy()
+ c_attributes = OnBehalfOfType_.c_attributes.copy()
+ c_child_order = OnBehalfOfType_.c_child_order[:]
+ c_cardinality = OnBehalfOfType_.c_cardinality.copy()
+
+def on_behalf_of_from_string(xml_string):
+ return saml2.create_class_from_xml_string(OnBehalfOf, xml_string)
+
+
+class KeyType(KeyTypeOpenEnum_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyType element """
+
+ c_tag = 'KeyType'
+ c_namespace = NAMESPACE
+ c_children = KeyTypeOpenEnum_.c_children.copy()
+ c_attributes = KeyTypeOpenEnum_.c_attributes.copy()
+ c_child_order = KeyTypeOpenEnum_.c_child_order[:]
+ c_cardinality = KeyTypeOpenEnum_.c_cardinality.copy()
+
+def key_type_from_string(xml_string):
+ return saml2.create_class_from_xml_string(KeyType, xml_string)
+
+
+class Encryption(EncryptionType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Encryption element """
+
+ c_tag = 'Encryption'
+ c_namespace = NAMESPACE
+ c_children = EncryptionType_.c_children.copy()
+ c_attributes = EncryptionType_.c_attributes.copy()
+ c_child_order = EncryptionType_.c_child_order[:]
+ c_cardinality = EncryptionType_.c_cardinality.copy()
+
+def encryption_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Encryption, xml_string)
+
+
+class ProofEncryption(ProofEncryptionType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ProofEncryption element """
+
+ c_tag = 'ProofEncryption'
+ c_namespace = NAMESPACE
+ c_children = ProofEncryptionType_.c_children.copy()
+ c_attributes = ProofEncryptionType_.c_attributes.copy()
+ c_child_order = ProofEncryptionType_.c_child_order[:]
+ c_cardinality = ProofEncryptionType_.c_cardinality.copy()
+
+def proof_encryption_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ProofEncryption, xml_string)
+
+
+class UseKey(UseKeyType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:UseKey element """
+
+ c_tag = 'UseKey'
+ c_namespace = NAMESPACE
+ c_children = UseKeyType_.c_children.copy()
+ c_attributes = UseKeyType_.c_attributes.copy()
+ c_child_order = UseKeyType_.c_child_order[:]
+ c_cardinality = UseKeyType_.c_cardinality.copy()
+
+def use_key_from_string(xml_string):
+ return saml2.create_class_from_xml_string(UseKey, xml_string)
+
+
+class DelegateTo(DelegateToType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:DelegateTo element """
+
+ c_tag = 'DelegateTo'
+ c_namespace = NAMESPACE
+ c_children = DelegateToType_.c_children.copy()
+ c_attributes = DelegateToType_.c_attributes.copy()
+ c_child_order = DelegateToType_.c_child_order[:]
+ c_cardinality = DelegateToType_.c_cardinality.copy()
+
+def delegate_to_from_string(xml_string):
+ return saml2.create_class_from_xml_string(DelegateTo, xml_string)
+
+
+class ParticipantsType_Primary(ParticipantType_):
+
+ c_tag = 'Primary'
+ c_namespace = NAMESPACE
+ c_children = ParticipantType_.c_children.copy()
+ c_attributes = ParticipantType_.c_attributes.copy()
+ c_child_order = ParticipantType_.c_child_order[:]
+ c_cardinality = ParticipantType_.c_cardinality.copy()
+
+def participants_type__primary_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ParticipantsType_Primary, xml_string)
+
+
+class ParticipantsType_Participant(ParticipantType_):
+
+ c_tag = 'Participant'
+ c_namespace = NAMESPACE
+ c_children = ParticipantType_.c_children.copy()
+ c_attributes = ParticipantType_.c_attributes.copy()
+ c_child_order = ParticipantType_.c_child_order[:]
+ c_cardinality = ParticipantType_.c_cardinality.copy()
+
+def participants_type__participant_from_string(xml_string):
+ return saml2.create_class_from_xml_string(ParticipantsType_Participant, xml_string)
+
+
+class ParticipantsType_(SamlBase):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ParticipantsType element """
+
+ c_tag = 'ParticipantsType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Primary'] = ('primary', ParticipantsType_Primary)
+ c_cardinality['primary'] = {"min":0, "max":1}
+ c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Participant'] = ('participant', [ParticipantsType_Participant])
+ c_cardinality['participant'] = {"min":0}
+ c_child_order.extend(['primary', 'participant'])
+
+ def __init__(self,
+ primary=None,
+ participant=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.primary=primary
+ self.participant=participant or []
+
+def participants_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(ParticipantsType_, xml_string)
+
+
+class BinarySecret(BinarySecretType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecret element """
+
+ c_tag = 'BinarySecret'
+ c_namespace = NAMESPACE
+ c_children = BinarySecretType_.c_children.copy()
+ c_attributes = BinarySecretType_.c_attributes.copy()
+ c_child_order = BinarySecretType_.c_child_order[:]
+ c_cardinality = BinarySecretType_.c_cardinality.copy()
+
+def binary_secret_from_string(xml_string):
+ return saml2.create_class_from_xml_string(BinarySecret, xml_string)
+
+
+class RequestSecurityTokenResponseCollection(RequestSecurityTokenResponseCollectionType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseCollection element """
+
+ c_tag = 'RequestSecurityTokenResponseCollection'
+ c_namespace = NAMESPACE
+ c_children = RequestSecurityTokenResponseCollectionType_.c_children.copy()
+ c_attributes = RequestSecurityTokenResponseCollectionType_.c_attributes.copy()
+ c_child_order = RequestSecurityTokenResponseCollectionType_.c_child_order[:]
+ c_cardinality = RequestSecurityTokenResponseCollectionType_.c_cardinality.copy()
+
+def request_security_token_response_collection_from_string(xml_string):
+ return saml2.create_class_from_xml_string(RequestSecurityTokenResponseCollection, xml_string)
+
+
+class Status(StatusType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Status element """
+
+ c_tag = 'Status'
+ c_namespace = NAMESPACE
+ c_children = StatusType_.c_children.copy()
+ c_attributes = StatusType_.c_attributes.copy()
+ c_child_order = StatusType_.c_child_order[:]
+ c_cardinality = StatusType_.c_cardinality.copy()
+
+def status_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Status, xml_string)
+
+
+class SignChallenge(SignChallengeType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallenge element """
+
+ c_tag = 'SignChallenge'
+ c_namespace = NAMESPACE
+ c_children = SignChallengeType_.c_children.copy()
+ c_attributes = SignChallengeType_.c_attributes.copy()
+ c_child_order = SignChallengeType_.c_child_order[:]
+ c_cardinality = SignChallengeType_.c_cardinality.copy()
+
+def sign_challenge_from_string(xml_string):
+ return saml2.create_class_from_xml_string(SignChallenge, xml_string)
+
+
+class SignChallengeResponse(SignChallengeType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallengeResponse element """
+
+ c_tag = 'SignChallengeResponse'
+ c_namespace = NAMESPACE
+ c_children = SignChallengeType_.c_children.copy()
+ c_attributes = SignChallengeType_.c_attributes.copy()
+ c_child_order = SignChallengeType_.c_child_order[:]
+ c_cardinality = SignChallengeType_.c_cardinality.copy()
+
+def sign_challenge_response_from_string(xml_string):
+ return saml2.create_class_from_xml_string(SignChallengeResponse, xml_string)
+
+
+class Authenticator(AuthenticatorType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Authenticator element """
+
+ c_tag = 'Authenticator'
+ c_namespace = NAMESPACE
+ c_children = AuthenticatorType_.c_children.copy()
+ c_attributes = AuthenticatorType_.c_attributes.copy()
+ c_child_order = AuthenticatorType_.c_child_order[:]
+ c_cardinality = AuthenticatorType_.c_cardinality.copy()
+
+def authenticator_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Authenticator, xml_string)
+
+
+class Participants(ParticipantsType_):
+ """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Participants element """
+
+ c_tag = 'Participants'
+ c_namespace = NAMESPACE
+ c_children = ParticipantsType_.c_children.copy()
+ c_attributes = ParticipantsType_.c_attributes.copy()
+ c_child_order = ParticipantsType_.c_child_order[:]
+ c_cardinality = ParticipantsType_.c_cardinality.copy()
+
+def participants_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Participants, xml_string)
+
+
+ELEMENT_FROM_STRING = {
+ RequestSecurityToken.c_tag: request_security_token_from_string,
+ RequestSecurityTokenType_.c_tag: request_security_token_type__from_string,
+ TokenType.c_tag: token_type_from_string,
+ RequestType.c_tag: request_type_from_string,
+ RequestTypeOpenEnum_.c_tag: request_type_open_enum__from_string,
+ RequestTypeEnum_.c_tag: request_type_enum__from_string,
+ RequestSecurityTokenResponse.c_tag: request_security_token_response_from_string,
+ RequestSecurityTokenResponseType_.c_tag: request_security_token_response_type__from_string,
+ RequestedSecurityToken.c_tag: requested_security_token_from_string,
+ RequestedSecurityTokenType_.c_tag: requested_security_token_type__from_string,
+ BinarySecret.c_tag: binary_secret_from_string,
+ BinarySecretType_.c_tag: binary_secret_type__from_string,
+ BinarySecretTypeEnum_.c_tag: binary_secret_type_enum__from_string,
+ BinarySecretTypeOpenEnum_.c_tag: binary_secret_type_open_enum__from_string,
+ Claims.c_tag: claims_from_string,
+ ClaimsType_.c_tag: claims_type__from_string,
+ Entropy.c_tag: entropy_from_string,
+ EntropyType_.c_tag: entropy_type__from_string,
+ Lifetime.c_tag: lifetime_from_string,
+ LifetimeType_.c_tag: lifetime_type__from_string,
+ RequestSecurityTokenCollection.c_tag: request_security_token_collection_from_string,
+ RequestSecurityTokenCollectionType_.c_tag: request_security_token_collection_type__from_string,
+ RequestSecurityTokenResponseCollection.c_tag: request_security_token_response_collection_from_string,
+ RequestSecurityTokenResponseCollectionType_.c_tag: request_security_token_response_collection_type__from_string,
+ ComputedKey.c_tag: computed_key_from_string,
+ ComputedKeyEnum_.c_tag: computed_key_enum__from_string,
+ ComputedKeyOpenEnum_.c_tag: computed_key_open_enum__from_string,
+ RequestedAttachedReference.c_tag: requested_attached_reference_from_string,
+ RequestedUnattachedReference.c_tag: requested_unattached_reference_from_string,
+ RequestedReferenceType_.c_tag: requested_reference_type__from_string,
+ RequestedProofToken.c_tag: requested_proof_token_from_string,
+ RequestedProofTokenType_.c_tag: requested_proof_token_type__from_string,
+ IssuedTokens.c_tag: issued_tokens_from_string,
+ RenewTarget.c_tag: renew_target_from_string,
+ RenewTargetType_.c_tag: renew_target_type__from_string,
+ AllowPostdating.c_tag: allow_postdating_from_string,
+ AllowPostdatingType_.c_tag: allow_postdating_type__from_string,
+ Renewing.c_tag: renewing_from_string,
+ RenewingType_.c_tag: renewing_type__from_string,
+ CancelTarget.c_tag: cancel_target_from_string,
+ CancelTargetType_.c_tag: cancel_target_type__from_string,
+ RequestedTokenCancelled.c_tag: requested_token_cancelled_from_string,
+ RequestedTokenCancelledType_.c_tag: requested_token_cancelled_type__from_string,
+ ValidateTarget.c_tag: validate_target_from_string,
+ ValidateTargetType_.c_tag: validate_target_type__from_string,
+ Status.c_tag: status_from_string,
+ StatusType_.c_tag: status_type__from_string,
+ StatusCodeEnum_.c_tag: status_code_enum__from_string,
+ StatusCodeOpenEnum_.c_tag: status_code_open_enum__from_string,
+ SignChallenge.c_tag: sign_challenge_from_string,
+ SignChallengeResponse.c_tag: sign_challenge_response_from_string,
+ SignChallengeType_.c_tag: sign_challenge_type__from_string,
+ Challenge.c_tag: challenge_from_string,
+ BinaryExchange.c_tag: binary_exchange_from_string,
+ BinaryExchangeType_.c_tag: binary_exchange_type__from_string,
+ RequestKET.c_tag: request_ket_from_string,
+ RequestKETType_.c_tag: request_ket_type__from_string,
+ KeyExchangeToken.c_tag: key_exchange_token_from_string,
+ KeyExchangeTokenType_.c_tag: key_exchange_token_type__from_string,
+ Authenticator.c_tag: authenticator_from_string,
+ AuthenticatorType_.c_tag: authenticator_type__from_string,
+ CombinedHash.c_tag: combined_hash_from_string,
+ OnBehalfOf.c_tag: on_behalf_of_from_string,
+ OnBehalfOfType_.c_tag: on_behalf_of_type__from_string,
+ Issuer.c_tag: issuer_from_string,
+ AuthenticationType.c_tag: authentication_type_from_string,
+ KeyType.c_tag: key_type_from_string,
+ KeyTypeEnum_.c_tag: key_type_enum__from_string,
+ KeyTypeOpenEnum_.c_tag: key_type_open_enum__from_string,
+ KeySize.c_tag: key_size_from_string,
+ SignatureAlgorithm.c_tag: signature_algorithm_from_string,
+ EncryptionAlgorithm.c_tag: encryption_algorithm_from_string,
+ CanonicalizationAlgorithm.c_tag: canonicalization_algorithm_from_string,
+ ComputedKeyAlgorithm.c_tag: computed_key_algorithm_from_string,
+ Encryption.c_tag: encryption_from_string,
+ EncryptionType_.c_tag: encryption_type__from_string,
+ ProofEncryption.c_tag: proof_encryption_from_string,
+ ProofEncryptionType_.c_tag: proof_encryption_type__from_string,
+ UseKey.c_tag: use_key_from_string,
+ UseKeyType_.c_tag: use_key_type__from_string,
+ KeyWrapAlgorithm.c_tag: key_wrap_algorithm_from_string,
+ SignWith.c_tag: sign_with_from_string,
+ EncryptWith.c_tag: encrypt_with_from_string,
+ DelegateTo.c_tag: delegate_to_from_string,
+ DelegateToType_.c_tag: delegate_to_type__from_string,
+ Forwardable.c_tag: forwardable_from_string,
+ Delegatable.c_tag: delegatable_from_string,
+ Participants.c_tag: participants_from_string,
+ ParticipantsType_.c_tag: participants_type__from_string,
+ ParticipantType_.c_tag: participant_type__from_string,
+ StatusType_Code.c_tag: status_type__code_from_string,
+ StatusType_Reason.c_tag: status_type__reason_from_string,
+ ParticipantsType_Primary.c_tag: participants_type__primary_from_string,
+ ParticipantsType_Participant.c_tag: participants_type__participant_from_string,
+}
+
+ELEMENT_BY_TAG = {
+ 'RequestSecurityToken': RequestSecurityToken,
+ 'RequestSecurityTokenType': RequestSecurityTokenType_,
+ 'TokenType': TokenType,
+ 'RequestType': RequestType,
+ 'RequestTypeOpenEnum': RequestTypeOpenEnum_,
+ 'RequestTypeEnum': RequestTypeEnum_,
+ 'RequestSecurityTokenResponse': RequestSecurityTokenResponse,
+ 'RequestSecurityTokenResponseType': RequestSecurityTokenResponseType_,
+ 'RequestedSecurityToken': RequestedSecurityToken,
+ 'RequestedSecurityTokenType': RequestedSecurityTokenType_,
+ 'BinarySecret': BinarySecret,
+ 'BinarySecretType': BinarySecretType_,
+ 'BinarySecretTypeEnum': BinarySecretTypeEnum_,
+ 'BinarySecretTypeOpenEnum': BinarySecretTypeOpenEnum_,
+ 'Claims': Claims,
+ 'ClaimsType': ClaimsType_,
+ 'Entropy': Entropy,
+ 'EntropyType': EntropyType_,
+ 'Lifetime': Lifetime,
+ 'LifetimeType': LifetimeType_,
+ 'RequestSecurityTokenCollection': RequestSecurityTokenCollection,
+ 'RequestSecurityTokenCollectionType': RequestSecurityTokenCollectionType_,
+ 'RequestSecurityTokenResponseCollection': RequestSecurityTokenResponseCollection,
+ 'RequestSecurityTokenResponseCollectionType': RequestSecurityTokenResponseCollectionType_,
+ 'ComputedKey': ComputedKey,
+ 'ComputedKeyEnum': ComputedKeyEnum_,
+ 'ComputedKeyOpenEnum': ComputedKeyOpenEnum_,
+ 'RequestedAttachedReference': RequestedAttachedReference,
+ 'RequestedUnattachedReference': RequestedUnattachedReference,
+ 'RequestedReferenceType': RequestedReferenceType_,
+ 'RequestedProofToken': RequestedProofToken,
+ 'RequestedProofTokenType': RequestedProofTokenType_,
+ 'IssuedTokens': IssuedTokens,
+ 'RenewTarget': RenewTarget,
+ 'RenewTargetType': RenewTargetType_,
+ 'AllowPostdating': AllowPostdating,
+ 'AllowPostdatingType': AllowPostdatingType_,
+ 'Renewing': Renewing,
+ 'RenewingType': RenewingType_,
+ 'CancelTarget': CancelTarget,
+ 'CancelTargetType': CancelTargetType_,
+ 'RequestedTokenCancelled': RequestedTokenCancelled,
+ 'RequestedTokenCancelledType': RequestedTokenCancelledType_,
+ 'ValidateTarget': ValidateTarget,
+ 'ValidateTargetType': ValidateTargetType_,
+ 'Status': Status,
+ 'StatusType': StatusType_,
+ 'StatusCodeEnum': StatusCodeEnum_,
+ 'StatusCodeOpenEnum': StatusCodeOpenEnum_,
+ 'SignChallenge': SignChallenge,
+ 'SignChallengeResponse': SignChallengeResponse,
+ 'SignChallengeType': SignChallengeType_,
+ 'Challenge': Challenge,
+ 'BinaryExchange': BinaryExchange,
+ 'BinaryExchangeType': BinaryExchangeType_,
+ 'RequestKET': RequestKET,
+ 'RequestKETType': RequestKETType_,
+ 'KeyExchangeToken': KeyExchangeToken,
+ 'KeyExchangeTokenType': KeyExchangeTokenType_,
+ 'Authenticator': Authenticator,
+ 'AuthenticatorType': AuthenticatorType_,
+ 'CombinedHash': CombinedHash,
+ 'OnBehalfOf': OnBehalfOf,
+ 'OnBehalfOfType': OnBehalfOfType_,
+ 'Issuer': Issuer,
+ 'AuthenticationType': AuthenticationType,
+ 'KeyType': KeyType,
+ 'KeyTypeEnum': KeyTypeEnum_,
+ 'KeyTypeOpenEnum': KeyTypeOpenEnum_,
+ 'KeySize': KeySize,
+ 'SignatureAlgorithm': SignatureAlgorithm,
+ 'EncryptionAlgorithm': EncryptionAlgorithm,
+ 'CanonicalizationAlgorithm': CanonicalizationAlgorithm,
+ 'ComputedKeyAlgorithm': ComputedKeyAlgorithm,
+ 'Encryption': Encryption,
+ 'EncryptionType': EncryptionType_,
+ 'ProofEncryption': ProofEncryption,
+ 'ProofEncryptionType': ProofEncryptionType_,
+ 'UseKey': UseKey,
+ 'UseKeyType': UseKeyType_,
+ 'KeyWrapAlgorithm': KeyWrapAlgorithm,
+ 'SignWith': SignWith,
+ 'EncryptWith': EncryptWith,
+ 'DelegateTo': DelegateTo,
+ 'DelegateToType': DelegateToType_,
+ 'Forwardable': Forwardable,
+ 'Delegatable': Delegatable,
+ 'Participants': Participants,
+ 'ParticipantsType': ParticipantsType_,
+ 'ParticipantType': ParticipantType_,
+ 'Code': StatusType_Code,
+ 'Reason': StatusType_Reason,
+ 'Primary': ParticipantsType_Primary,
+ 'Participant': ParticipantsType_Participant,
+}
+
+
+def factory(tag, **kwargs):
+ return ELEMENT_BY_TAG[tag](**kwargs)
+
diff --git a/src/saml2/ws/wsutil.py b/src/saml2/ws/wsutil.py
new file mode 100644
index 00000000..3f93565b
--- /dev/null
+++ b/src/saml2/ws/wsutil.py
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+
+#
+# Generated Sun Jun 14 12:18:10 2015 by parse_xsd.py version 0.5.
+#
+
+import saml2
+from saml2 import SamlBase
+
+NAMESPACE = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
+
+class TTimestampFault_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:tTimestampFault element """
+
+ c_tag = 'tTimestampFault'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+
+def t_timestamp_fault__from_string(xml_string):
+ return saml2.create_class_from_xml_string(TTimestampFault_, xml_string)
+
+class AttributedDateTime_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:AttributedDateTime element """
+
+ c_tag = 'AttributedDateTime'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'string'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Id'] = ('Id', 'anyURI', False)
+
+ def __init__(self,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.Id=Id
+
+def attributed_date_time__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedDateTime_, xml_string)
+
+class AttributedURI_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:AttributedURI element """
+
+ c_tag = 'AttributedURI'
+ c_namespace = NAMESPACE
+ c_value_type = {'base': 'anyURI'}
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_attributes['Id'] = ('Id', 'anyURI', False)
+
+ def __init__(self,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.Id=Id
+
+def attributed_ur_i__from_string(xml_string):
+ return saml2.create_class_from_xml_string(AttributedURI_, xml_string)
+
+class Expires(AttributedDateTime_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:Expires element """
+
+ c_tag = 'Expires'
+ c_namespace = NAMESPACE
+ c_children = AttributedDateTime_.c_children.copy()
+ c_attributes = AttributedDateTime_.c_attributes.copy()
+ c_child_order = AttributedDateTime_.c_child_order[:]
+ c_cardinality = AttributedDateTime_.c_cardinality.copy()
+
+def expires_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Expires, xml_string)
+
+class Created(AttributedDateTime_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:Created element """
+
+ c_tag = 'Created'
+ c_namespace = NAMESPACE
+ c_children = AttributedDateTime_.c_children.copy()
+ c_attributes = AttributedDateTime_.c_attributes.copy()
+ c_child_order = AttributedDateTime_.c_child_order[:]
+ c_cardinality = AttributedDateTime_.c_cardinality.copy()
+
+def created_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Created, xml_string)
+
+class TimestampType_(SamlBase):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:TimestampType element """
+
+ c_tag = 'TimestampType'
+ c_namespace = NAMESPACE
+ c_children = SamlBase.c_children.copy()
+ c_attributes = SamlBase.c_attributes.copy()
+ c_child_order = SamlBase.c_child_order[:]
+ c_cardinality = SamlBase.c_cardinality.copy()
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Created'] = ('created', Created)
+ c_cardinality['created'] = {"min":0, "max":1}
+ c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Expires'] = ('expires', Expires)
+ c_cardinality['expires'] = {"min":0, "max":1}
+ c_attributes['Id'] = ('Id', 'anyURI', False)
+ c_child_order.extend(['created', 'expires'])
+
+ def __init__(self,
+ created=None,
+ expires=None,
+ Id=None,
+ text=None,
+ extension_elements=None,
+ extension_attributes=None,
+ ):
+ SamlBase.__init__(self,
+ text=text,
+ extension_elements=extension_elements,
+ extension_attributes=extension_attributes,
+ )
+ self.created=created
+ self.expires=expires
+ self.Id=Id
+
+def timestamp_type__from_string(xml_string):
+ return saml2.create_class_from_xml_string(TimestampType_, xml_string)
+
+class Timestamp(TimestampType_):
+ """The http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd:Timestamp element """
+
+ c_tag = 'Timestamp'
+ c_namespace = NAMESPACE
+ c_children = TimestampType_.c_children.copy()
+ c_attributes = TimestampType_.c_attributes.copy()
+ c_child_order = TimestampType_.c_child_order[:]
+ c_cardinality = TimestampType_.c_cardinality.copy()
+
+def timestamp_from_string(xml_string):
+ return saml2.create_class_from_xml_string(Timestamp, xml_string)
+
+#..................
+AG_commonAtts = [
+ ('Id', '', False),
+]
+
+ELEMENT_FROM_STRING = {
+ TTimestampFault_.c_tag: t_timestamp_fault__from_string,
+ AttributedDateTime_.c_tag: attributed_date_time__from_string,
+ AttributedURI_.c_tag: attributed_ur_i__from_string,
+ TimestampType_.c_tag: timestamp_type__from_string,
+ Timestamp.c_tag: timestamp_from_string,
+ Expires.c_tag: expires_from_string,
+ Created.c_tag: created_from_string,
+}
+
+ELEMENT_BY_TAG = {
+ 'tTimestampFault': TTimestampFault_,
+ 'AttributedDateTime': AttributedDateTime_,
+ 'AttributedURI': AttributedURI_,
+ 'TimestampType': TimestampType_,
+ 'Timestamp': Timestamp,
+ 'Expires': Expires,
+ 'Created': Created,
+}
+
+
+def factory(tag, **kwargs):
+ return ELEMENT_BY_TAG[tag](**kwargs)
+