jwt 2.2.2 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +79 -44
  3. data/CHANGELOG.md +299 -5
  4. data/CODE_OF_CONDUCT.md +84 -0
  5. data/CONTRIBUTING.md +99 -0
  6. data/README.md +416 -107
  7. data/lib/jwt/base64.rb +19 -2
  8. data/lib/jwt/claims/audience.rb +30 -0
  9. data/lib/jwt/claims/crit.rb +35 -0
  10. data/lib/jwt/claims/decode_verifier.rb +40 -0
  11. data/lib/jwt/claims/expiration.rb +32 -0
  12. data/lib/jwt/claims/issued_at.rb +22 -0
  13. data/lib/jwt/claims/issuer.rb +34 -0
  14. data/lib/jwt/claims/jwt_id.rb +35 -0
  15. data/lib/jwt/claims/not_before.rb +32 -0
  16. data/lib/jwt/claims/numeric.rb +77 -0
  17. data/lib/jwt/claims/required.rb +33 -0
  18. data/lib/jwt/claims/subject.rb +30 -0
  19. data/lib/jwt/claims/verification_methods.rb +20 -0
  20. data/lib/jwt/claims/verifier.rb +61 -0
  21. data/lib/jwt/claims.rb +74 -0
  22. data/lib/jwt/claims_validator.rb +7 -22
  23. data/lib/jwt/configuration/container.rb +52 -0
  24. data/lib/jwt/configuration/decode_configuration.rb +70 -0
  25. data/lib/jwt/configuration/jwk_configuration.rb +28 -0
  26. data/lib/jwt/configuration.rb +23 -0
  27. data/lib/jwt/decode.rb +70 -57
  28. data/lib/jwt/deprecations.rb +49 -0
  29. data/lib/jwt/encode.rb +16 -54
  30. data/lib/jwt/encoded_token.rb +139 -0
  31. data/lib/jwt/error.rb +37 -0
  32. data/lib/jwt/json.rb +1 -1
  33. data/lib/jwt/jwa/compat.rb +32 -0
  34. data/lib/jwt/jwa/ecdsa.rb +90 -0
  35. data/lib/jwt/jwa/eddsa.rb +35 -0
  36. data/lib/jwt/jwa/hmac.rb +82 -0
  37. data/lib/jwt/jwa/hmac_rbnacl.rb +50 -0
  38. data/lib/jwt/jwa/hmac_rbnacl_fixed.rb +47 -0
  39. data/lib/jwt/jwa/none.rb +24 -0
  40. data/lib/jwt/jwa/ps.rb +35 -0
  41. data/lib/jwt/jwa/rsa.rb +35 -0
  42. data/lib/jwt/jwa/signing_algorithm.rb +63 -0
  43. data/lib/jwt/jwa/unsupported.rb +20 -0
  44. data/lib/jwt/jwa/wrapper.rb +44 -0
  45. data/lib/jwt/jwa.rb +58 -0
  46. data/lib/jwt/jwk/ec.rb +250 -0
  47. data/lib/jwt/jwk/hmac.rb +102 -0
  48. data/lib/jwt/jwk/key_base.rb +58 -0
  49. data/lib/jwt/jwk/key_finder.rb +20 -30
  50. data/lib/jwt/jwk/kid_as_key_digest.rb +16 -0
  51. data/lib/jwt/jwk/okp_rbnacl.rb +109 -0
  52. data/lib/jwt/jwk/rsa.rb +174 -26
  53. data/lib/jwt/jwk/set.rb +82 -0
  54. data/lib/jwt/jwk/thumbprint.rb +26 -0
  55. data/lib/jwt/jwk.rb +40 -15
  56. data/lib/jwt/token.rb +112 -0
  57. data/lib/jwt/verify.rb +16 -74
  58. data/lib/jwt/version.rb +52 -10
  59. data/lib/jwt/x5c_key_finder.rb +52 -0
  60. data/lib/jwt.rb +28 -4
  61. data/ruby-jwt.gemspec +20 -11
  62. metadata +61 -63
  63. data/.codeclimate.yml +0 -20
  64. data/.ebert.yml +0 -18
  65. data/.gitignore +0 -11
  66. data/.rspec +0 -1
  67. data/.rubocop.yml +0 -98
  68. data/.travis.yml +0 -29
  69. data/Appraisals +0 -18
  70. data/Gemfile +0 -3
  71. data/Rakefile +0 -11
  72. data/lib/jwt/algos/ecdsa.rb +0 -35
  73. data/lib/jwt/algos/eddsa.rb +0 -23
  74. data/lib/jwt/algos/hmac.rb +0 -34
  75. data/lib/jwt/algos/ps.rb +0 -43
  76. data/lib/jwt/algos/rsa.rb +0 -19
  77. data/lib/jwt/algos/unsupported.rb +0 -16
  78. data/lib/jwt/default_options.rb +0 -15
  79. data/lib/jwt/security_utils.rb +0 -57
  80. data/lib/jwt/signature.rb +0 -54
data/lib/jwt/version.rb CHANGED
@@ -1,24 +1,66 @@
1
- # encoding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
- # Moments version builder module
3
+ # JSON Web Token implementation
4
+ #
5
+ # Should be up to date with the latest spec:
6
+ # https://tools.ietf.org/html/rfc7519
5
7
  module JWT
8
+ # Returns the gem version of the JWT library.
9
+ #
10
+ # @return [Gem::Version] the gem version.
6
11
  def self.gem_version
7
- Gem::Version.new VERSION::STRING
12
+ Gem::Version.new(VERSION::STRING)
8
13
  end
9
14
 
10
- # Moments version builder module
15
+ # @api private
11
16
  module VERSION
12
- # major version
13
17
  MAJOR = 2
14
- # minor version
15
- MINOR = 2
16
- # tiny version
18
+ MINOR = 10
17
19
  TINY = 2
18
- # alpha, beta, etc. tag
19
20
  PRE = nil
20
21
 
21
- # Build version string
22
22
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
23
23
  end
24
+
25
+ # Checks if the OpenSSL version is 3 or greater.
26
+ #
27
+ # @return [Boolean] true if OpenSSL version is 3 or greater, false otherwise.
28
+ # @api private
29
+ def self.openssl_3?
30
+ return false if OpenSSL::OPENSSL_VERSION.include?('LibreSSL')
31
+
32
+ true if 3 * 0x10000000 <= OpenSSL::OPENSSL_VERSION_NUMBER
33
+ end
34
+
35
+ # Checks if the RbNaCl library is defined.
36
+ #
37
+ # @return [Boolean] true if RbNaCl is defined, false otherwise.
38
+ # @api private
39
+ def self.rbnacl?
40
+ defined?(::RbNaCl)
41
+ end
42
+
43
+ # Checks if the RbNaCl library version is 6.0.0 or greater.
44
+ #
45
+ # @return [Boolean] true if RbNaCl version is 6.0.0 or greater, false otherwise.
46
+ # @api private
47
+ def self.rbnacl_6_or_greater?
48
+ rbnacl? && ::Gem::Version.new(::RbNaCl::VERSION) >= ::Gem::Version.new('6.0.0')
49
+ end
50
+
51
+ # Checks if there is an OpenSSL 3 HMAC empty key regression.
52
+ #
53
+ # @return [Boolean] true if there is an OpenSSL 3 HMAC empty key regression, false otherwise.
54
+ # @api private
55
+ def self.openssl_3_hmac_empty_key_regression?
56
+ openssl_3? && openssl_version <= ::Gem::Version.new('3.0.0')
57
+ end
58
+
59
+ # Returns the OpenSSL version.
60
+ #
61
+ # @return [Gem::Version] the OpenSSL version.
62
+ # @api private
63
+ def self.openssl_version
64
+ @openssl_version ||= ::Gem::Version.new(OpenSSL::VERSION)
65
+ end
24
66
  end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module JWT
4
+ # If the x5c header certificate chain can be validated by trusted root
5
+ # certificates, and none of the certificates are revoked, returns the public
6
+ # key from the first certificate.
7
+ # See https://tools.ietf.org/html/rfc7515#section-4.1.6
8
+ class X5cKeyFinder
9
+ def initialize(root_certificates, crls = nil)
10
+ raise ArgumentError, 'Root certificates must be specified' unless root_certificates
11
+
12
+ @store = build_store(root_certificates, crls)
13
+ end
14
+
15
+ def from(x5c_header_or_certificates)
16
+ signing_certificate, *certificate_chain = parse_certificates(x5c_header_or_certificates)
17
+ store_context = OpenSSL::X509::StoreContext.new(@store, signing_certificate, certificate_chain)
18
+
19
+ if store_context.verify
20
+ signing_certificate.public_key
21
+ else
22
+ error = "Certificate verification failed: #{store_context.error_string}."
23
+ if (current_cert = store_context.current_cert)
24
+ error = "#{error} Certificate subject: #{current_cert.subject}."
25
+ end
26
+
27
+ raise JWT::VerificationError, error
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def build_store(root_certificates, crls)
34
+ store = OpenSSL::X509::Store.new
35
+ store.purpose = OpenSSL::X509::PURPOSE_ANY
36
+ store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK | OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
37
+ root_certificates.each { |certificate| store.add_cert(certificate) }
38
+ crls&.each { |crl| store.add_crl(crl) }
39
+ store
40
+ end
41
+
42
+ def parse_certificates(x5c_header_or_certificates)
43
+ if x5c_header_or_certificates.all? { |obj| obj.is_a?(OpenSSL::X509::Certificate) }
44
+ x5c_header_or_certificates
45
+ else
46
+ x5c_header_or_certificates.map do |encoded|
47
+ OpenSSL::X509::Certificate.new(::JWT::Base64.url_decode(encoded))
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
data/lib/jwt.rb CHANGED
@@ -1,22 +1,37 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'jwt/version'
3
4
  require 'jwt/base64'
4
5
  require 'jwt/json'
5
6
  require 'jwt/decode'
6
- require 'jwt/default_options'
7
+ require 'jwt/configuration'
8
+ require 'jwt/deprecations'
7
9
  require 'jwt/encode'
8
10
  require 'jwt/error'
9
11
  require 'jwt/jwk'
12
+ require 'jwt/claims'
13
+ require 'jwt/encoded_token'
14
+ require 'jwt/token'
15
+
16
+ require 'jwt/claims_validator'
17
+ require 'jwt/verify'
10
18
 
11
19
  # JSON Web Token implementation
12
20
  #
13
21
  # Should be up to date with the latest spec:
14
22
  # https://tools.ietf.org/html/rfc7519
15
23
  module JWT
16
- include JWT::DefaultOptions
24
+ extend ::JWT::Configuration
17
25
 
18
26
  module_function
19
27
 
28
+ # Encodes a payload into a JWT.
29
+ #
30
+ # @param payload [Hash] the payload to encode.
31
+ # @param key [String] the key used to sign the JWT.
32
+ # @param algorithm [String] the algorithm used to sign the JWT.
33
+ # @param header_fields [Hash] additional headers to include in the JWT.
34
+ # @return [String] the encoded JWT.
20
35
  def encode(payload, key, algorithm = 'HS256', header_fields = {})
21
36
  Encode.new(payload: payload,
22
37
  key: key,
@@ -24,7 +39,16 @@ module JWT
24
39
  headers: header_fields).segments
25
40
  end
26
41
 
27
- def decode(jwt, key = nil, verify = true, options = {}, &keyfinder)
28
- Decode.new(jwt, key, verify, DEFAULT_OPTIONS.merge(options), &keyfinder).decode_segments
42
+ # Decodes a JWT to extract the payload and header
43
+ #
44
+ # @param jwt [String] the JWT to decode.
45
+ # @param key [String] the key used to verify the JWT.
46
+ # @param verify [Boolean] whether to verify the JWT signature.
47
+ # @param options [Hash] additional options for decoding.
48
+ # @return [Array<Hash>] the decoded payload and headers.
49
+ def decode(jwt, key = nil, verify = true, options = {}, &keyfinder) # rubocop:disable Style/OptionalBooleanParameter
50
+ Deprecations.context do
51
+ Decode.new(jwt, key, verify, configuration.decode.to_h.merge(options), &keyfinder).decode_segments
52
+ end
29
53
  end
30
54
  end
data/ruby-jwt.gemspec CHANGED
@@ -1,4 +1,6 @@
1
- lib = File.expand_path('../lib/', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'jwt/version'
4
6
 
@@ -13,22 +15,29 @@ Gem::Specification.new do |spec|
13
15
  spec.description = 'A pure ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT) standard.'
14
16
  spec.homepage = 'https://github.com/jwt/ruby-jwt'
15
17
  spec.license = 'MIT'
16
- spec.required_ruby_version = '>= 2.1'
18
+ spec.required_ruby_version = '>= 2.5'
19
+ spec.metadata = {
20
+ 'bug_tracker_uri' => 'https://github.com/jwt/ruby-jwt/issues',
21
+ 'changelog_uri' => "https://github.com/jwt/ruby-jwt/blob/v#{JWT.gem_version}/CHANGELOG.md",
22
+ 'rubygems_mfa_required' => 'true'
23
+ }
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(spec|gemfiles|coverage|bin)/}) || # Irrelevant folders
27
+ f.match(/^\.+/) || # Files and folders starting with .
28
+ f.match(/^(Appraisals|Gemfile|Rakefile)$/) # Irrelevant files
29
+ end
17
30
 
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|gemfiles|coverage|bin)/}) }
19
31
  spec.executables = []
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
32
  spec.require_paths = %w[lib]
22
33
 
34
+ spec.add_dependency 'base64'
35
+
23
36
  spec.add_development_dependency 'appraisal'
24
37
  spec.add_development_dependency 'bundler'
38
+ spec.add_development_dependency 'logger'
25
39
  spec.add_development_dependency 'rake'
26
40
  spec.add_development_dependency 'rspec'
27
- spec.add_development_dependency 'simplecov', '< 0.18'
28
- spec.add_development_dependency 'simplecov-json'
29
- spec.add_development_dependency 'codeclimate-test-reporter'
30
- spec.add_development_dependency 'codacy-coverage'
31
- spec.add_development_dependency 'rbnacl'
32
- # RSASSA-PSS support provided by OpenSSL +2.1
33
- spec.add_development_dependency 'openssl', '~> 2.1'
41
+ spec.add_development_dependency 'rubocop'
42
+ spec.add_development_dependency 'simplecov'
34
43
  end
metadata CHANGED
@@ -1,23 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Rudat
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: appraisal
13
+ name: base64
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: '0'
20
- type: :development
19
+ type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
@@ -25,7 +24,7 @@ dependencies:
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
27
26
  - !ruby/object:Gem::Dependency
28
- name: bundler
27
+ name: appraisal
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
@@ -39,7 +38,7 @@ dependencies:
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
40
  - !ruby/object:Gem::Dependency
42
- name: rake
41
+ name: bundler
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
@@ -53,7 +52,7 @@ dependencies:
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0'
55
54
  - !ruby/object:Gem::Dependency
56
- name: rspec
55
+ name: logger
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
@@ -67,21 +66,7 @@ dependencies:
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  - !ruby/object:Gem::Dependency
70
- name: simplecov
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "<"
74
- - !ruby/object:Gem::Version
75
- version: '0.18'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "<"
81
- - !ruby/object:Gem::Version
82
- version: '0.18'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov-json
69
+ name: rake
85
70
  requirement: !ruby/object:Gem::Requirement
86
71
  requirements:
87
72
  - - ">="
@@ -95,7 +80,7 @@ dependencies:
95
80
  - !ruby/object:Gem::Version
96
81
  version: '0'
97
82
  - !ruby/object:Gem::Dependency
98
- name: codeclimate-test-reporter
83
+ name: rspec
99
84
  requirement: !ruby/object:Gem::Requirement
100
85
  requirements:
101
86
  - - ">="
@@ -109,7 +94,7 @@ dependencies:
109
94
  - !ruby/object:Gem::Version
110
95
  version: '0'
111
96
  - !ruby/object:Gem::Dependency
112
- name: codacy-coverage
97
+ name: rubocop
113
98
  requirement: !ruby/object:Gem::Requirement
114
99
  requirements:
115
100
  - - ">="
@@ -123,7 +108,7 @@ dependencies:
123
108
  - !ruby/object:Gem::Version
124
109
  version: '0'
125
110
  - !ruby/object:Gem::Dependency
126
- name: rbnacl
111
+ name: simplecov
127
112
  requirement: !ruby/object:Gem::Requirement
128
113
  requirements:
129
114
  - - ">="
@@ -136,20 +121,6 @@ dependencies:
136
121
  - - ">="
137
122
  - !ruby/object:Gem::Version
138
123
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: openssl
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '2.1'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '2.1'
153
124
  description: A pure ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT)
154
125
  standard.
155
126
  email: timrudat@gmail.com
@@ -157,46 +128,74 @@ executables: []
157
128
  extensions: []
158
129
  extra_rdoc_files: []
159
130
  files:
160
- - ".codeclimate.yml"
161
- - ".ebert.yml"
162
- - ".gitignore"
163
- - ".rspec"
164
- - ".rubocop.yml"
165
- - ".travis.yml"
166
131
  - AUTHORS
167
- - Appraisals
168
132
  - CHANGELOG.md
169
- - Gemfile
133
+ - CODE_OF_CONDUCT.md
134
+ - CONTRIBUTING.md
170
135
  - LICENSE
171
136
  - README.md
172
- - Rakefile
173
137
  - lib/jwt.rb
174
- - lib/jwt/algos/ecdsa.rb
175
- - lib/jwt/algos/eddsa.rb
176
- - lib/jwt/algos/hmac.rb
177
- - lib/jwt/algos/ps.rb
178
- - lib/jwt/algos/rsa.rb
179
- - lib/jwt/algos/unsupported.rb
180
138
  - lib/jwt/base64.rb
139
+ - lib/jwt/claims.rb
140
+ - lib/jwt/claims/audience.rb
141
+ - lib/jwt/claims/crit.rb
142
+ - lib/jwt/claims/decode_verifier.rb
143
+ - lib/jwt/claims/expiration.rb
144
+ - lib/jwt/claims/issued_at.rb
145
+ - lib/jwt/claims/issuer.rb
146
+ - lib/jwt/claims/jwt_id.rb
147
+ - lib/jwt/claims/not_before.rb
148
+ - lib/jwt/claims/numeric.rb
149
+ - lib/jwt/claims/required.rb
150
+ - lib/jwt/claims/subject.rb
151
+ - lib/jwt/claims/verification_methods.rb
152
+ - lib/jwt/claims/verifier.rb
181
153
  - lib/jwt/claims_validator.rb
154
+ - lib/jwt/configuration.rb
155
+ - lib/jwt/configuration/container.rb
156
+ - lib/jwt/configuration/decode_configuration.rb
157
+ - lib/jwt/configuration/jwk_configuration.rb
182
158
  - lib/jwt/decode.rb
183
- - lib/jwt/default_options.rb
159
+ - lib/jwt/deprecations.rb
184
160
  - lib/jwt/encode.rb
161
+ - lib/jwt/encoded_token.rb
185
162
  - lib/jwt/error.rb
186
163
  - lib/jwt/json.rb
164
+ - lib/jwt/jwa.rb
165
+ - lib/jwt/jwa/compat.rb
166
+ - lib/jwt/jwa/ecdsa.rb
167
+ - lib/jwt/jwa/eddsa.rb
168
+ - lib/jwt/jwa/hmac.rb
169
+ - lib/jwt/jwa/hmac_rbnacl.rb
170
+ - lib/jwt/jwa/hmac_rbnacl_fixed.rb
171
+ - lib/jwt/jwa/none.rb
172
+ - lib/jwt/jwa/ps.rb
173
+ - lib/jwt/jwa/rsa.rb
174
+ - lib/jwt/jwa/signing_algorithm.rb
175
+ - lib/jwt/jwa/unsupported.rb
176
+ - lib/jwt/jwa/wrapper.rb
187
177
  - lib/jwt/jwk.rb
178
+ - lib/jwt/jwk/ec.rb
179
+ - lib/jwt/jwk/hmac.rb
180
+ - lib/jwt/jwk/key_base.rb
188
181
  - lib/jwt/jwk/key_finder.rb
182
+ - lib/jwt/jwk/kid_as_key_digest.rb
183
+ - lib/jwt/jwk/okp_rbnacl.rb
189
184
  - lib/jwt/jwk/rsa.rb
190
- - lib/jwt/security_utils.rb
191
- - lib/jwt/signature.rb
185
+ - lib/jwt/jwk/set.rb
186
+ - lib/jwt/jwk/thumbprint.rb
187
+ - lib/jwt/token.rb
192
188
  - lib/jwt/verify.rb
193
189
  - lib/jwt/version.rb
190
+ - lib/jwt/x5c_key_finder.rb
194
191
  - ruby-jwt.gemspec
195
192
  homepage: https://github.com/jwt/ruby-jwt
196
193
  licenses:
197
194
  - MIT
198
- metadata: {}
199
- post_install_message:
195
+ metadata:
196
+ bug_tracker_uri: https://github.com/jwt/ruby-jwt/issues
197
+ changelog_uri: https://github.com/jwt/ruby-jwt/blob/v2.10.2/CHANGELOG.md
198
+ rubygems_mfa_required: 'true'
200
199
  rdoc_options: []
201
200
  require_paths:
202
201
  - lib
@@ -204,15 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
204
203
  requirements:
205
204
  - - ">="
206
205
  - !ruby/object:Gem::Version
207
- version: '2.1'
206
+ version: '2.5'
208
207
  required_rubygems_version: !ruby/object:Gem::Requirement
209
208
  requirements:
210
209
  - - ">="
211
210
  - !ruby/object:Gem::Version
212
211
  version: '0'
213
212
  requirements: []
214
- rubygems_version: 3.1.2
215
- signing_key:
213
+ rubygems_version: 3.6.7
216
214
  specification_version: 4
217
215
  summary: JSON Web Token implementation in Ruby
218
216
  test_files: []
data/.codeclimate.yml DELETED
@@ -1,20 +0,0 @@
1
- engines:
2
- rubocop:
3
- enabled: true
4
- golint:
5
- enabled: false
6
- gofmt:
7
- enabled: false
8
- eslint:
9
- enabled: false
10
- csslint:
11
- enabled: false
12
-
13
- ratings:
14
- paths:
15
- - lib/**
16
- - "**.rb"
17
-
18
- exclude_paths:
19
- - spec/**/*
20
- - vendor/**/*
data/.ebert.yml DELETED
@@ -1,18 +0,0 @@
1
- styleguide: excpt/linters
2
- engines:
3
- reek:
4
- enabled: true
5
- fixme:
6
- enabled: true
7
- rubocop:
8
- enabled: true
9
- channel: rubocop-0-49
10
- duplication:
11
- config:
12
- languages:
13
- - ruby
14
- enabled: true
15
- remark-lint:
16
- enabled: true
17
- exclude_paths:
18
- - spec
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- .idea/
2
- jwt.gemspec
3
- pkg
4
- Gemfile.lock
5
- coverage/
6
- .DS_Store
7
- .rbenv-gemsets
8
- .ruby-version
9
- .vscode/
10
- .bundle
11
- *gemfile.lock
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.rubocop.yml DELETED
@@ -1,98 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'bin/**/*'
4
- - 'db/**/*'
5
- - 'config/**/*'
6
- - 'script/**/*'
7
-
8
- Rails:
9
- Enabled: true
10
-
11
- Style/AlignParameters:
12
- EnforcedStyle: with_fixed_indentation
13
-
14
- Style/CaseIndentation:
15
- EnforcedStyle: end
16
-
17
- Style/AsciiComments:
18
- Enabled: false
19
-
20
- Style/IndentHash:
21
- Enabled: false
22
-
23
- Style/CollectionMethods:
24
- Enabled: true
25
- PreferredMethods:
26
- inject: 'inject'
27
-
28
- Style/Documentation:
29
- Enabled: false
30
-
31
- Style/BlockDelimiters:
32
- Exclude:
33
- - spec/**/*_spec.rb
34
-
35
- Style/BracesAroundHashParameters:
36
- Exclude:
37
- - spec/**/*_spec.rb
38
-
39
- Style/GuardClause:
40
- Enabled: false
41
-
42
- Style/IfUnlessModifier:
43
- Enabled: false
44
-
45
- Style/SpaceInsideHashLiteralBraces:
46
- Enabled: false
47
-
48
- Style/Lambda:
49
- Enabled: false
50
-
51
- Style/RaiseArgs:
52
- Enabled: false
53
-
54
- Style/SignalException:
55
- Enabled: false
56
-
57
- Metrics/AbcSize:
58
- Max: 20
59
-
60
- Metrics/ClassLength:
61
- Max: 100
62
-
63
- Metrics/ModuleLength:
64
- Max: 100
65
-
66
- Metrics/LineLength:
67
- Enabled: false
68
-
69
- Metrics/MethodLength:
70
- Max: 15
71
-
72
- Style/SingleLineBlockParams:
73
- Enabled: false
74
-
75
- Lint/EndAlignment:
76
- EnforcedStyleAlignWith: variable
77
-
78
- Style/FormatString:
79
- Enabled: false
80
-
81
- Style/MultilineMethodCallIndentation:
82
- EnforcedStyle: indented
83
-
84
- Style/MultilineOperationIndentation:
85
- EnforcedStyle: indented
86
-
87
- Style/WordArray:
88
- Enabled: false
89
-
90
- Style/RedundantSelf:
91
- Enabled: false
92
-
93
- Style/AlignHash:
94
- Enabled: true
95
- EnforcedLastArgumentHashStyle: always_ignore
96
-
97
- Style/TrivialAccessors:
98
- AllowPredicates: true
data/.travis.yml DELETED
@@ -1,29 +0,0 @@
1
- sudo: required
2
- cache: bundler
3
- dist: trusty
4
- language: ruby
5
- rvm:
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- gemfile:
11
- - gemfiles/standalone.gemfile
12
- - gemfiles/rails_5.0.gemfile
13
- - gemfiles/rails_5.1.gemfile
14
- - gemfiles/rails_5.2.gemfile
15
- - gemfiles/rails_6.0.gemfile
16
- script: "bundle exec rspec && bundle exec codeclimate-test-reporter"
17
- before_install:
18
- - sudo add-apt-repository ppa:chris-lea/libsodium -y
19
- - sudo apt-get update -q
20
- - sudo apt-get install libsodium-dev -y
21
- - gem install bundler
22
-
23
- matrix:
24
- fast_finish: true
25
- exclude:
26
- - gemfile: gemfiles/rails_6.0.gemfile
27
- rvm: 2.3
28
- - gemfile: gemfiles/rails_6.0.gemfile
29
- rvm: 2.4
data/Appraisals DELETED
@@ -1,18 +0,0 @@
1
- appraise 'standalone' do
2
- end
3
-
4
- appraise 'rails-5.0' do
5
- gem 'rails', '~> 5.0.0'
6
- end
7
-
8
- appraise 'rails-5.1' do
9
- gem 'rails', '~> 5.1.0'
10
- end
11
-
12
- appraise 'rails-5.2' do
13
- gem 'rails', '~> 5.2.0'
14
- end
15
-
16
- appraise 'rails-6.0' do
17
- gem 'rails', '~> 6.0.0'
18
- end
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- require 'bundler/gem_tasks'
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:test)
7
-
8
- task default: :test
9
- rescue LoadError
10
- puts 'RSpec rake tasks not available. Please run "bundle install" to install missing dependencies.'
11
- end