Module: JwtClaims::Claim::Exp
- Defined in:
- lib/jwt_claims/claim/exp.rb
Overview
Expiration time
Class Method Summary collapse
-
.reject?(numeric_date, options = {}) ⇒ true, false
Whether to reject the claim.
Class Method Details
.reject?(numeric_date, options = {}) ⇒ true, false
Returns whether to reject the claim.
13 14 15 16 17 |
# File 'lib/jwt_claims/claim/exp.rb', line 13 def reject?(numeric_date, = {}) return true unless numeric_date.is_a?(Numeric) seconds = Util.leeway_seconds(.fetch(:leeway_seconds, 0)) numeric_date <= Time.now.to_i - seconds end |