Skip to content

Commit 1aeae3a

Browse files
Merge pull request #711 from EE/artifact2message-sign
Allow request signing in artifact2message
2 parents 9e5c9ab + 276dff0 commit 1aeae3a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/saml2/entity.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,11 +1277,12 @@ def artifact2destination(self, artifact, descriptor):
12771277

12781278
return destination
12791279

1280-
def artifact2message(self, artifact, descriptor):
1280+
def artifact2message(self, artifact, descriptor, sign=False):
12811281
"""
12821282
12831283
:param artifact: The Base64 encoded SAML artifact as sent over the net
12841284
:param descriptor: The type of entity on the other side
1285+
:param sign: Whether ArtifactResolve should be signed or not
12851286
:return: A SAML message (request/response)
12861287
"""
12871288

@@ -1291,7 +1292,12 @@ def artifact2message(self, artifact, descriptor):
12911292
raise SAMLError("Missing endpoint location")
12921293

12931294
_sid = sid()
1294-
mid, msg = self.create_artifact_resolve(artifact, destination, _sid)
1295+
mid, msg = self.create_artifact_resolve(
1296+
artifact,
1297+
destination,
1298+
_sid,
1299+
sign=sign,
1300+
)
12951301
return self.send_using_soap(msg, destination)
12961302

12971303
def parse_artifact_resolve(self, txt, **kwargs):

0 commit comments

Comments
 (0)