summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Jurewicz <krzysztof.jurewicz@laboratorium.ee>2020-08-25 18:58:45 +0200
committerKrzysztof Jurewicz <krzysztof.jurewicz@laboratorium.ee>2020-08-25 18:58:45 +0200
commit276dff0c1b54c756ce84508978d3487dd5c28585 (patch)
tree13cc8e743b5dff00f3ebb09c07e6b254d2b56dd9
parent9e5c9ab426ce8e602ca769c7fc259a2fb1325877 (diff)
downloadpysaml2-276dff0c1b54c756ce84508978d3487dd5c28585.tar.gz
Allow request signing in artifact2message
-rw-r--r--src/saml2/entity.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py
index b7fe5c30..91219d72 100644
--- a/src/saml2/entity.py
+++ b/src/saml2/entity.py
@@ -1277,11 +1277,12 @@ class Entity(HTTPBase):
return destination
- def artifact2message(self, artifact, descriptor):
+ def artifact2message(self, artifact, descriptor, sign=False):
"""
:param artifact: The Base64 encoded SAML artifact as sent over the net
:param descriptor: The type of entity on the other side
+ :param sign: Whether ArtifactResolve should be signed or not
:return: A SAML message (request/response)
"""
@@ -1291,7 +1292,12 @@ class Entity(HTTPBase):
raise SAMLError("Missing endpoint location")
_sid = sid()
- mid, msg = self.create_artifact_resolve(artifact, destination, _sid)
+ mid, msg = self.create_artifact_resolve(
+ artifact,
+ destination,
+ _sid,
+ sign=sign,
+ )
return self.send_using_soap(msg, destination)
def parse_artifact_resolve(self, txt, **kwargs):