Skip to content

Commit 00d6380

Browse files
committed
Fix wrong message
1 parent 66d9c9f commit 00d6380

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/onelogin/ruby-saml/response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,15 +709,15 @@ def validate_issuer
709709
# this time validation is relaxed by the allowed_clock_drift value)
710710
# If fails, the error is added to the errors array
711711
# @param soft [Boolean] soft Enable or Disable the soft mode (In order to raise exceptions when the response is invalid or not)
712-
# @return [Boolean] True if the SessionNotOnOrAfter of the AttributeStatement is valid, otherwise (when expired) False if soft=True
712+
# @return [Boolean] True if the SessionNotOnOrAfter of the AuthnStatement is valid, otherwise (when expired) False if soft=True
713713
# @raise [ValidationError] if soft == false and validation fails
714714
#
715715
def validate_session_expiration(soft = true)
716716
return true if session_expires_at.nil?
717717

718718
now = Time.now.utc
719719
unless (session_expires_at + allowed_clock_drift) > now
720-
error_msg = "The attributes have expired, based on the SessionNotOnOrAfter of the AttributeStatement of this Response"
720+
error_msg = "The attributes have expired, based on the SessionNotOnOrAfter of the AuthnStatement of this Response"
721721
return append_error(error_msg)
722722
end
723723

test/response_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def generate_audience_error(expected, actual)
817817
it "return false when the session has expired" do
818818
response.settings = settings
819819
assert !response.send(:validate_session_expiration)
820-
assert_includes response.errors, "The attributes have expired, based on the SessionNotOnOrAfter of the AttributeStatement of this Response"
820+
assert_includes response.errors, "The attributes have expired, based on the SessionNotOnOrAfter of the AuthnStatement of this Response"
821821
end
822822

823823
it "returns true when the session has expired, but is still within the allowed_clock_drift" do

test/settings_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class SettingsTest < Minitest::Test
102102

103103
@settings = OneLogin::RubySaml::Settings.new(config)
104104
assert_equal @settings.security[:metadata_signed], true
105-
assert_equal @settings.security[:digest_method], nil
105+
assert_nil @settings.security[:digest_method]
106106
end
107107

108108
describe "#single_logout_service_url" do

0 commit comments

Comments
 (0)