diff options
author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2020-09-01 17:47:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 17:47:44 +0300 |
commit | 1aeae3ae565e02f863a26b2893354d048a7abff8 (patch) | |
tree | 13cc8e743b5dff00f3ebb09c07e6b254d2b56dd9 | |
parent | 9e5c9ab426ce8e602ca769c7fc259a2fb1325877 (diff) | |
parent | 276dff0c1b54c756ce84508978d3487dd5c28585 (diff) | |
download | pysaml2-1aeae3ae565e02f863a26b2893354d048a7abff8.tar.gz |
Merge pull request #711 from EE/artifact2message-sign
Allow request signing in artifact2message
-rw-r--r-- | src/saml2/entity.py | 10 |
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): |