Skip to content

Commit

Permalink
Bring back old methods
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinj committed Oct 1, 2024
1 parent 97a5474 commit 618e8a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/jwt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/jwt/claims.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions lib/jwt/jwa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 618e8a2

Please sign in to comment.