summaryrefslogtreecommitdiff
path: root/src/saml2/client_base.py
diff options
context:
space:
mode:
authorScott Koranda <skoranda@gmail.com>2017-12-27 15:08:28 -0600
committerIvan Kanakarakis <ivan.kanak@gmail.com>2018-11-21 17:36:02 +0200
commit23fe5142709a0894b02b166a84dcead945b0c93e (patch)
treec0b190173261080637bdd434ebf0458dd4ff1d80 /src/saml2/client_base.py
parent40a3699ef25a514b4a2ba7bf1ce2a0cdb3428abf (diff)
downloadpysaml2-23fe5142709a0894b02b166a84dcead945b0c93e.tar.gz
Add want_assertions_or_response_signed functionality
Add the ability to configure an SP to require either a signed response or signed assertions. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'src/saml2/client_base.py')
-rw-r--r--src/saml2/client_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index 0cd6eb53..d5e0cbd5 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -120,6 +120,7 @@ class Base(Entity):
"authn_requests_signed": False,
"want_assertions_signed": False,
"want_response_signed": True,
+ "want_assertions_or_response_signed" : False
}
for attr, val_default in attribute_defaults.items():
@@ -135,7 +136,11 @@ class Base(Entity):
setattr(self, attr, val)
if self.entity_type == "sp" and not any(
- [self.want_assertions_signed, self.want_response_signed]
+ [
+ self.want_assertions_signed,
+ self.want_response_signed,
+ self.want_assertions_or_response_signed,
+ ]
):
logger.warning(
"The SAML service provider accepts unsigned SAML Responses "
@@ -691,6 +696,7 @@ class Base(Entity):
"outstanding_certs": outstanding_certs,
"allow_unsolicited": self.allow_unsolicited,
"want_assertions_signed": self.want_assertions_signed,
+ "want_assertions_or_response_signed": self.want_assertions_or_response_signed,
"want_response_signed": self.want_response_signed,
"return_addrs": self.service_urls(binding=binding),
"entity_id": self.config.entityid,