diff options
author | e271828- <e271828-@users.noreply.github.com> | 2020-09-13 22:35:41 -0400 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2021-07-27 11:58:50 +0300 |
commit | 3cedd0bce9fc75f3bc8917f64bc86c54fd741072 (patch) | |
tree | bd1a123f5eda681c41016138fe51f36b6a095a24 /src | |
parent | 20000a7f9faf2c5797b5d2cd064bcfde7e41ad29 (diff) | |
download | pysaml2-3cedd0bce9fc75f3bc8917f64bc86c54fd741072.tar.gz |
Add note to docs on debugging responses
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/saml2/response.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/saml2/response.py b/src/saml2/response.py index 72d0ef75..fc2071d3 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -413,7 +413,7 @@ class StatusResponse(object): self.response.destination and self.response.destination not in self.return_addrs ): - logger.error("%s not in %s", self.response.destination, self.return_addrs) + logger.error("destination '%s' not in return addresses '%s'", self.response.destination, self.return_addrs) return None valid = self.issue_instant_ok() and self.status_ok() @@ -737,6 +737,10 @@ class AuthnResponse(StatusResponse): def get_subject(self): """ The assertion must contain a Subject """ + + if not self.assertion: + raise ValueError("Missing assertion") + if not self.assertion.subject: raise ValueError( "Invalid assertion subject: {subject}".format( |