Skip to content

Commit 028f75c

Browse files
author
Roland Hedberg
committed
Merge pull request #307 from rectalogic/astime
'AsTime' validator should be 'dateTime'
2 parents 7450928 + fe07219 commit 028f75c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/saml2/saml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ class SubjectConfirmationDataType_(SamlBase):
441441
c_attributes = SamlBase.c_attributes.copy()
442442
c_child_order = SamlBase.c_child_order[:]
443443
c_cardinality = SamlBase.c_cardinality.copy()
444-
c_attributes['NotBefore'] = ('not_before', 'AsTime', False)
444+
c_attributes['NotBefore'] = ('not_before', 'dateTime', False)
445445
c_attributes['NotOnOrAfter'] = ('not_on_or_after', 'dateTime', False)
446446
c_attributes['Recipient'] = ('recipient', 'anyURI', False)
447447
c_attributes['InResponseTo'] = ('in_response_to', 'NCName', False)

tests/test_02_saml.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,13 @@ def testUsingTestData(self):
851851
assert sc.subject_confirmation_data.in_response_to == "responseID"
852852
assert sc.subject_confirmation_data.address == "127.0.0.1"
853853

854+
def testVerify(self):
855+
"""Test SubjectConfirmation verify"""
856+
857+
sc = saml.subject_confirmation_from_string(
858+
saml2_data.TEST_SUBJECT_CONFIRMATION)
859+
assert sc.verify()
860+
854861

855862
class TestSubject:
856863
def setup_class(self):

0 commit comments

Comments
 (0)