Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/saml2/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ def load_instance(self, instance):
def _loads(self, xmldata, decode=True, origxml=None):

# own copy
self.xmlstr = xmldata[:]
if isinstance(xmldata, six.binary_type):
self.xmlstr = xmldata[:].decode('utf-8')
else:
self.xmlstr = xmldata[:]
logger.debug("xmlstr: %s", self.xmlstr)
if origxml:
self.origxml = origxml
Expand Down Expand Up @@ -1082,15 +1085,13 @@ def session_info(self):
"session_index": authn_statement.session_index}

def __str__(self):
if isinstance(self.xmlstr, six.string_types):
return self.xmlstr
return str(self.xmlstr)
return self.xmlstr

def verify_recipient(self, recipient):
"""
Verify that I'm the recipient of the assertion
:param recipient: A URI specifying the entity or location to which an

:param recipient: A URI specifying the entity or location to which an
attesting entity can present the assertion.
:return: True/False
"""
Expand Down
5 changes: 0 additions & 5 deletions tests/test_65_authn_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ def test_flow():

with closing(Server(config_file="idp_all_conf")) as idp:
relay_state = "FOO"
# -- dummy request ---
orig_req = AuthnRequest(
issuer=sp._issuer(),
name_id_policy=NameIDPolicy(allow_create="true",
format=NAMEID_FORMAT_TRANSIENT))

# == Create an AuthnRequest response

Expand Down