Couple of new shortcut methods.

This commit is contained in:
Roland Hedberg
2013-01-13 19:41:25 +01:00
parent 0e8efaadd1
commit 976e4a84f5

View File

@@ -770,6 +770,11 @@ class SecurityContext(object):
return self.correctly_signed_message(decoded_xml, "logout_request",
must, origdoc)
def correctly_signed_logout_response(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml, "logout_response",
must, origdoc)
def correctly_signed_attribute_query(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml, "attribute_query",
@@ -781,6 +786,12 @@ class SecurityContext(object):
"authz_decision_query", must,
origdoc)
def correctly_signed_authz_decision_response(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml,
"authz_decision_response", must,
origdoc)
def correctly_signed_name_id_mapping_request(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml,
@@ -793,6 +804,18 @@ class SecurityContext(object):
"name_id_mapping_response",
must, origdoc)
def correctly_signed_artifact_request(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml,
"artifact_request",
must, origdoc)
def correctly_signed_artifact_response(self, decoded_xml, must=False,
origdoc=None):
return self.correctly_signed_message(decoded_xml,
"artifact_response",
must, origdoc)
def correctly_signed_response(self, decoded_xml, must=False, origdoc=None):
""" Check if a instance is correctly signed, if we have metadata for
the IdP that sent the info use that, if not use the key that are in