jwt 2.10.0 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/jwt/verify.rb DELETED
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'error'
4
-
5
- module JWT
6
- # @deprecated This class is deprecated and will be removed in the next major version of ruby-jwt.
7
- class Verify
8
- DEFAULTS = { leeway: 0 }.freeze
9
- METHODS = %w[verify_aud verify_expiration verify_iat verify_iss verify_jti verify_not_before verify_sub verify_required_claims].freeze
10
-
11
- private_constant(:DEFAULTS, :METHODS)
12
- class << self
13
- METHODS.each do |method_name|
14
- define_method(method_name) do |payload, options|
15
- new(payload, options).send(method_name)
16
- end
17
- end
18
-
19
- # @deprecated This method is deprecated and will be removed in the next major version of ruby-jwt.
20
- def verify_claims(payload, options)
21
- Deprecations.warning('The ::JWT::Verify.verify_claims method is deprecated and will be removed in the next major version of ruby-jwt')
22
- ::JWT::Claims.verify!(payload, options)
23
- true
24
- end
25
- end
26
-
27
- # @deprecated This class is deprecated and will be removed in the next major version of ruby-jwt.
28
- def initialize(payload, options)
29
- Deprecations.warning('The ::JWT::Verify class is deprecated and will be removed in the next major version of ruby-jwt')
30
- @payload = payload
31
- @options = DEFAULTS.merge(options)
32
- end
33
-
34
- METHODS.each do |method_name|
35
- define_method(method_name) do
36
- ::JWT::Claims.verify!(@payload, @options.merge(method_name => true))
37
- end
38
- end
39
- end
40
- end