@@ -633,15 +633,15 @@ def generate_audience_error(expected, actual)
633
633
:skip_conditions => true ,
634
634
:skip_subject_confirmation => true } )
635
635
}
636
-
636
+
637
637
it "be able to parse the response wihout errors" do
638
638
response_with_formatted_x509certificate . settings = settings
639
- response_with_formatted_x509certificate . settings . idp_cert = ruby_saml_cert_text
639
+ response_with_formatted_x509certificate . settings . idp_cert = ruby_saml_cert_text
640
640
assert response_with_formatted_x509certificate . is_valid?
641
641
assert_empty response_with_formatted_x509certificate . errors
642
642
end
643
643
end
644
-
644
+
645
645
describe "#validate_in_response_to" do
646
646
it "return true when the inResponseTo value matches the Request ID" do
647
647
response = OneLogin ::RubySaml ::Response . new ( response_document_valid_signed , :settings => settings , :matches_request_id => "_fc4a34b0-7efb-012e-caae-782bcb13bb38" )
@@ -1072,6 +1072,24 @@ def generate_audience_error(expected, actual)
1072
1072
)
1073
1073
assert special_response_with_saml2_namespace . send ( :validate_conditions )
1074
1074
end
1075
+
1076
+ Timecop . freeze ( Time . parse ( "2011-06-14T18:21:01Z" ) ) do
1077
+ settings . soft = true
1078
+ special_response_with_saml2_namespace = OneLogin ::RubySaml ::Response . new (
1079
+ response_document_with_saml2_namespace ,
1080
+ :allowed_clock_drift => '0.515' ,
1081
+ :settings => settings
1082
+ )
1083
+ assert !special_response_with_saml2_namespace . send ( :validate_conditions )
1084
+ end
1085
+
1086
+ Timecop . freeze ( Time . parse ( "2011-06-14T18:21:01Z" ) ) do
1087
+ special_response_with_saml2_namespace = OneLogin ::RubySaml ::Response . new (
1088
+ response_document_with_saml2_namespace ,
1089
+ :allowed_clock_drift => '0.516'
1090
+ )
1091
+ assert special_response_with_saml2_namespace . send ( :validate_conditions )
1092
+ end
1075
1093
end
1076
1094
end
1077
1095
0 commit comments