Class: JWT::Claims::Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/claims/numeric.rb

Defined Under Namespace

Classes: Compat

Constant Summary collapse

NUMERIC_CLAIMS =
%i[
  exp
  iat
  nbf
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object



22
23
24
25
26
# File 'lib/jwt/claims/numeric.rb', line 22

def self.new(*args)
  return super if args.empty?

  Compat.new(*args)
end

.verify!(payload:, **_args) ⇒ Object



32
33
34
# File 'lib/jwt/claims/numeric.rb', line 32

def self.verify!(payload:, **_args)
  JWT::Claims.verify_payload!(payload, :numeric)
end

Instance Method Details

#verify!(context:) ⇒ Object



28
29
30
# File 'lib/jwt/claims/numeric.rb', line 28

def verify!(context:)
  validate_numeric_claims(context.payload)
end