Skip to content

Commit 11ee8b7

Browse files
author
Roland Hedberg
committed
Fixed argument error
1 parent 03c5a8f commit 11ee8b7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/saml2/server.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,20 @@ def create_authn_response(self, identity, in_response_to, destination,
443443

444444

445445
try:
446+
_authn = {"authn_auth": authn}
447+
if "authn_decl" in kwargs and kwargs["authn_decl"]:
448+
_authn["decl"] = kwargs["authn_decl"]
449+
if "class_ref" in kwargs and kwargs["class_ref"]:
450+
_authn["class_ref"] = kwargs["class_ref"]
451+
else:
452+
_authn["class_ref"] = None
453+
446454
return self._authn_response(in_response_to, # in_response_to
447455
destination, # consumer_url
448456
sp_entity_id, # sp_entity_id
449457
identity, # identity as dictionary
450458
name_id,
451-
authn=authn,
459+
authn=_authn,
452460
issuer=issuer,
453461
policy=policy,
454462
sign_assertion=sign_assertion,
@@ -467,8 +475,9 @@ def create_authn_request_response(self, identity, in_response_to,
467475

468476
return self.create_authn_response(identity, in_response_to, destination,
469477
sp_entity_id, name_id_policy, userid,
470-
name_id, authn, authn_decl, issuer,
471-
sign_response, sign_assertion)
478+
name_id, authn, issuer,
479+
sign_response, sign_assertion,
480+
authn_decl=authn_decl)
472481

473482
#noinspection PyUnusedLocal
474483
def create_assertion_id_request_response(self, assertion_id, sign=False,

0 commit comments

Comments
 (0)