Class: JWT::Claims::IssuedAt
- Inherits:
-
Object
- Object
- JWT::Claims::IssuedAt
- Defined in:
- lib/jwt/claims/issued_at.rb
Instance Method Summary collapse
Instance Method Details
#verify!(context:, **_args) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/jwt/claims/issued_at.rb', line 6 def verify!(context:, **_args) return unless context.payload.is_a?(Hash) return unless context.payload.key?('iat') iat = context.payload['iat'] raise(JWT::InvalidIatError, 'Invalid iat') if !iat.is_a?(::Numeric) || iat.to_f > Time.now.to_f end |