Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/jwt_claims/claim/iat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ module Iat
# until the specified UTC date/time, and non-integer values may be used
# @param options [Hash] optional, ignored
# @return [true, false] whether to reject the claim
def reject?(numeric_date, _options = {})
def reject?(numeric_date, options = {})
return true unless numeric_date.is_a?(Numeric)
numeric_date >= Time.now.to_i
seconds = Util.leeway_seconds(options.fetch(:leeway_seconds, 0))
numeric_date - seconds >= Time.now.to_i
end
end
end
Expand Down