diff --git a/lib/jwt.rb b/lib/jwt.rb index f7f28d47..dd5cdff5 100644 --- a/lib/jwt.rb +++ b/lib/jwt.rb @@ -11,6 +11,9 @@ require 'jwt/jwk' require 'jwt/claims' +require 'jwt/claims_validator' +require 'jwt/verify' + # JSON Web Token implementation # # Should be up to date with the latest spec: diff --git a/lib/jwt/claims.rb b/lib/jwt/claims.rb index 9bb71488..8ae74299 100644 --- a/lib/jwt/claims.rb +++ b/lib/jwt/claims.rb @@ -28,7 +28,7 @@ module Claims class << self def verify!(payload, options) VERIFIERS.each do |key, verifier_builder| - next unless options[key] + next unless options[key] || options[key.to_s] verifier_builder&.call(options)&.verify!(context: VerificationContext.new(payload: payload)) end diff --git a/lib/jwt/jwa.rb b/lib/jwt/jwa.rb index 8a975824..75edf621 100644 --- a/lib/jwt/jwa.rb +++ b/lib/jwt/jwa.rb @@ -40,6 +40,11 @@ def resolve(algorithm) algorithm end + + def create(algorithm) + Deprecations.warning('The ::JWT::JWA.create method is deprecated and is going to be removed in future ruby-jwt versions') + resolve(algorithm) + end end end end