Added unravel support for HTTP Artifact.

This commit is contained in:
Roland Hedberg
2014-02-15 10:28:23 +01:00
parent 9a1974b6a6
commit e5806a6623

View File

@@ -291,7 +291,8 @@ class Entity(HTTPBase):
def unravel(self, txt, binding, msgtype="response"): def unravel(self, txt, binding, msgtype="response"):
#logger.debug("unravel '%s'" % txt) #logger.debug("unravel '%s'" % txt)
if binding not in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST, if binding not in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST,
BINDING_SOAP, BINDING_URI, None]: BINDING_SOAP, BINDING_URI, BINDING_HTTP_ARTIFACT,
None]:
raise ValueError("Don't know how to handle '%s'" % binding) raise ValueError("Don't know how to handle '%s'" % binding)
else: else:
try: try:
@@ -302,6 +303,8 @@ class Entity(HTTPBase):
elif binding == BINDING_SOAP: elif binding == BINDING_SOAP:
func = getattr(soap, "parse_soap_enveloped_saml_%s" % msgtype) func = getattr(soap, "parse_soap_enveloped_saml_%s" % msgtype)
xmlstr = func(txt) xmlstr = func(txt)
elif binding == BINDING_HTTP_ARTIFACT:
xmlstr = base64.b64decode(txt)
else: else:
xmlstr = txt xmlstr = txt
except Exception: except Exception: