Class: JWT::Verify

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

Constant Summary collapse

DEFAULTS =
{ leeway: 0 }.freeze
METHODS =
%w[verify_aud verify_expiration verify_iat verify_iss verify_jti verify_not_before verify_sub verify_required_claims].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload, options) ⇒ Verify

Returns a new instance of Verify.



23
24
25
26
# File 'lib/jwt/verify.rb', line 23

def initialize(payload, options)
  @payload = payload
  @options = DEFAULTS.merge(options)
end

Class Method Details

.verify_claims(payload, options) ⇒ Object



17
18
19
20
# File 'lib/jwt/verify.rb', line 17

def verify_claims(payload, options)
  ::JWT::Claims.verify!(payload, options)
  true
end