diff options
author | Rodrigo <rodrigo@maxttor.com> | 2020-01-31 11:24:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 11:24:18 +0100 |
commit | 92dbdd79178b142721e6409b56c07c8333b66d26 (patch) | |
tree | 128cb240f3d876aec1e8ee9078d4ce457f85b71c | |
parent | 340b95482dfa7c558b5bb3ad90ae9b8a81061a96 (diff) | |
parent | c01913cdc99f5b63ae988bdff74855202a6c34e5 (diff) | |
download | pysaml2-92dbdd79178b142721e6409b56c07c8333b66d26.tar.gz |
Merge pull request #1 from rristow/rristow-patch-1
Update response.py
-rw-r--r-- | src/saml2/response.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/saml2/response.py b/src/saml2/response.py index f61a376f..f2e2f53e 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -212,10 +212,8 @@ def for_me(conditions, myself): if audience.text.strip() == myself: return True else: - # print("Not for me: %s != %s" % (audience.text.strip(), - # myself)) - pass - + logger.debug("AudienceRestriction - One condition not satisfied: %s != %s" % (audience.text.strip(), myself)) + logger.debug("AudienceRestrictions not satisfied!") return False @@ -613,7 +611,7 @@ class AuthnResponse(StatusResponse): if not for_me(conditions, self.entity_id): if not lax: - raise Exception("Not for me!!!") + raise Exception("AudienceRestrictions conditions not satisfied! (Local entity_id=%s)" % self.entity_id) if conditions.condition: # extra conditions for cond in conditions.condition: |