Module: JwtClaims::Claim::Iat

Defined in:
lib/jwt_claims/claim/iat.rb

Overview

Issued at

Class Method Summary collapse

Class Method Details

.reject?(numeric_date, _options = {}) ⇒ true, false

Returns whether to reject the claim.

Parameters:

  • numeric_date (Numeric)

    the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, and non-integer values may be used

  • options (Hash)

    optional, ignored

Returns:

  • (true, false)

    whether to reject the claim



13
14
15
16
# File 'lib/jwt_claims/claim/iat.rb', line 13

def reject?(numeric_date, _options = {})
  return true unless numeric_date.is_a?(Numeric)
  numeric_date >= Time.now.to_i
end