Module: JWT::Claims::DecodeVerifier

Defined in:
lib/jwt/claims/decode_verifier.rb

Overview

Verifiers to support the ::JWT.decode method

Class Method Summary collapse

Class Method Details

.verify!(payload, options) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/jwt/claims/decode_verifier.rb', line 29

def verify!(payload, options)
  VERIFIERS.each do |key, verifier_builder|
    next unless options[key] || options[key.to_s]

    verifier_builder&.call(options)&.verify!(context: VerificationContext.new(payload: payload))
  end
  nil
end