Skip to content

Commit e5806a6

Browse files
author
Roland Hedberg
committed
Added unravel support for HTTP Artifact.
1 parent 9a1974b commit e5806a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/saml2/entity.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ def response_args(self, message, bindings=None, descr_type=""):
291291
def unravel(self, txt, binding, msgtype="response"):
292292
#logger.debug("unravel '%s'" % txt)
293293
if binding not in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST,
294-
BINDING_SOAP, BINDING_URI, None]:
294+
BINDING_SOAP, BINDING_URI, BINDING_HTTP_ARTIFACT,
295+
None]:
295296
raise ValueError("Don't know how to handle '%s'" % binding)
296297
else:
297298
try:
@@ -302,6 +303,8 @@ def unravel(self, txt, binding, msgtype="response"):
302303
elif binding == BINDING_SOAP:
303304
func = getattr(soap, "parse_soap_enveloped_saml_%s" % msgtype)
304305
xmlstr = func(txt)
306+
elif binding == BINDING_HTTP_ARTIFACT:
307+
xmlstr = base64.b64decode(txt)
305308
else:
306309
xmlstr = txt
307310
except Exception:

0 commit comments

Comments
 (0)