From 98d3d25331a2a215181d7401606f154e22fb797f Mon Sep 17 00:00:00 2001 From: Andrew Wason Date: Thu, 28 Jan 2016 17:17:23 -0500 Subject: [PATCH 1/2] 'AsTime' validator should be 'dateTime' --- src/saml2/saml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saml2/saml.py b/src/saml2/saml.py index a764782..c7c05f8 100644 --- a/src/saml2/saml.py +++ b/src/saml2/saml.py @@ -441,7 +441,7 @@ class SubjectConfirmationDataType_(SamlBase): c_attributes = SamlBase.c_attributes.copy() c_child_order = SamlBase.c_child_order[:] c_cardinality = SamlBase.c_cardinality.copy() - c_attributes['NotBefore'] = ('not_before', 'AsTime', False) + c_attributes['NotBefore'] = ('not_before', 'dateTime', False) c_attributes['NotOnOrAfter'] = ('not_on_or_after', 'dateTime', False) c_attributes['Recipient'] = ('recipient', 'anyURI', False) c_attributes['InResponseTo'] = ('in_response_to', 'NCName', False) From fe072198233f2816db198c575d4c1003d0c67ff3 Mon Sep 17 00:00:00 2001 From: Andrew Wason Date: Thu, 28 Jan 2016 18:13:46 -0500 Subject: [PATCH 2/2] Add test for SubjectConfirmation validation. --- tests/test_02_saml.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_02_saml.py b/tests/test_02_saml.py index 16921a5..ffce4a3 100644 --- a/tests/test_02_saml.py +++ b/tests/test_02_saml.py @@ -851,6 +851,13 @@ class TestSubjectConfirmation: assert sc.subject_confirmation_data.in_response_to == "responseID" assert sc.subject_confirmation_data.address == "127.0.0.1" + def testVerify(self): + """Test SubjectConfirmation verify""" + + sc = saml.subject_confirmation_from_string( + saml2_data.TEST_SUBJECT_CONFIRMATION) + assert sc.verify() + class TestSubject: def setup_class(self):