Skip to content

Commit b73f9fd

Browse files
author
Roland Hedberg
committed
Moved from tuple to dictionary as authn argument value
1 parent d930441 commit b73f9fd

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/saml2/server.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ def create_authn_response(self, identity, in_response_to, destination,
408408
:param sp_entity_id: The entity identifier of the Service Provider
409409
:param name_id_policy: How the NameID should be constructed
410410
:param userid: The subject identifier
411-
:param authn: Information about the authentication context
411+
:param authn: Dictionary with information about the authentication
412+
context
412413
:param issuer: Issuer of the response
413414
:param sign_assertion: Whether the assertion should be signed or not.
414415
:param sign_response: Whether the response should be signed or not.
@@ -444,15 +445,8 @@ def create_authn_response(self, identity, in_response_to, destination,
444445
exc, name_id)
445446
return ("%s" % response).split("\n")
446447

447-
448448
try:
449-
_authn = {"authn_auth": authn}
450-
if "authn_decl" in kwargs and kwargs["authn_decl"]:
451-
_authn["decl"] = kwargs["authn_decl"]
452-
if "class_ref" in kwargs and kwargs["class_ref"]:
453-
_authn["class_ref"] = kwargs["class_ref"]
454-
else:
455-
_authn["class_ref"] = None
449+
_authn = authn
456450

457451
return self._authn_response(in_response_to, # in_response_to
458452
destination, # consumer_url

0 commit comments

Comments
 (0)