jwt 2.2.0 → 2.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9c95845a569e103adbcf481349aec2ff37efd08b7b2bbdc1b4ab1496237c772
4
- data.tar.gz: e68c5323e1c5ea635ab70ff70c821a963a64b061da9a2ae32ea3619e01cbf71d
3
+ metadata.gz: a43128b4e2f4d47a90b9834ad66b65411794d599660e459f3296ad5eea043a74
4
+ data.tar.gz: 158319e4108c4001f499fe13195d6659e90e741a1e563fbc6f531bf820fb50e8
5
5
  SHA512:
6
- metadata.gz: 2302b70c3dc5cabef0ae22d5515959cc66bb5e97b241605217c34bb30051e7a5b39df815786f5ffa1b177c745d745ac006e7c84775f0327da5aca1bed2832fdc
7
- data.tar.gz: 8e24651a2a2f96e5027419743b7fe748fa33a61588598ae38a40751899fc240a72cb1850376e42fb0080c6b62286a654c48151fb677bc56743868b79178e4a60
6
+ metadata.gz: f2b714380b47796ead0390f84650d11b0c7a963256cb7475e122e71c7eebfd94af97bf029f091f7916c2c37819eef7795899112e0bdf685a5634445bdf307dce
7
+ data.tar.gz: a80b9e615d14c8fb673973b4bd9b76aaf2c9685298c0d2c2fd39a50902ddc62900ba2680b2c207593dfc9ea7993c72649c0e535d2a04c50d34c95c37c220b242
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: test
3
+ on:
4
+ push:
5
+ branches:
6
+ - "*"
7
+ pull_request:
8
+ branches:
9
+ - "*"
10
+ jobs:
11
+ lint:
12
+ name: RuboCop
13
+ timeout-minutes: 30
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: "2.4"
21
+ bundler-cache: true
22
+ - name: Run RuboCop
23
+ run: bundle exec rubocop
24
+ test:
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ ruby:
29
+ - 2.3
30
+ - 2.4
31
+ - 2.5
32
+ - 2.6
33
+ - 2.7
34
+ - "3.0"
35
+ gemfile:
36
+ - gemfiles/standalone.gemfile
37
+ - gemfiles/openssl.gemfile
38
+ - gemfiles/rbnacl.gemfile
39
+ experimental: [false]
40
+ include:
41
+ - ruby: 2.1
42
+ gemfile: 'gemfiles/rbnacl.gemfile'
43
+ experimental: false
44
+ - ruby: 2.2
45
+ gemfile: 'gemfiles/rbnacl.gemfile'
46
+ experimental: false
47
+ - ruby: 2.7
48
+ coverage: "true"
49
+ gemfile: 'gemfiles/rbnacl.gemfile'
50
+ - ruby: "ruby-head"
51
+ experimental: true
52
+ - ruby: "truffleruby-head"
53
+ experimental: true
54
+ runs-on: ubuntu-20.04
55
+ continue-on-error: ${{ matrix.experimental }}
56
+ env:
57
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
58
+
59
+ steps:
60
+ - uses: actions/checkout@v2
61
+
62
+ - name: Install libsodium
63
+ run: |
64
+ sudo apt-get update -q
65
+ sudo apt-get install libsodium-dev -y
66
+
67
+ - name: Set up Ruby
68
+ uses: ruby/setup-ruby@v1
69
+ with:
70
+ ruby-version: ${{ matrix.ruby }}
71
+ bundler-cache: true
72
+
73
+ - name: Run tests
74
+ run: bundle exec rspec
data/.rspec CHANGED
@@ -1 +1,2 @@
1
+ --require spec_helper
1
2
  --color
data/.rubocop.yml CHANGED
@@ -1,23 +1,18 @@
1
- AllCops:
2
- Exclude:
3
- - 'bin/**/*'
4
- - 'db/**/*'
5
- - 'config/**/*'
6
- - 'script/**/*'
1
+ inherit_from: .rubocop_todo.yml
7
2
 
8
- Rails:
9
- Enabled: true
3
+ AllCops:
4
+ TargetRubyVersion: 2.1
10
5
 
11
- Style/AlignParameters:
6
+ Layout/AlignParameters:
12
7
  EnforcedStyle: with_fixed_indentation
13
8
 
14
- Style/CaseIndentation:
9
+ Layout/CaseIndentation:
15
10
  EnforcedStyle: end
16
11
 
17
12
  Style/AsciiComments:
18
13
  Enabled: false
19
14
 
20
- Style/IndentHash:
15
+ Layout/IndentHash:
21
16
  Enabled: false
22
17
 
23
18
  Style/CollectionMethods:
@@ -42,7 +37,7 @@ Style/GuardClause:
42
37
  Style/IfUnlessModifier:
43
38
  Enabled: false
44
39
 
45
- Style/SpaceInsideHashLiteralBraces:
40
+ Layout/SpaceInsideHashLiteralBraces:
46
41
  Enabled: false
47
42
 
48
43
  Style/Lambda:
@@ -58,7 +53,7 @@ Metrics/AbcSize:
58
53
  Max: 20
59
54
 
60
55
  Metrics/ClassLength:
61
- Max: 100
56
+ Max: 101
62
57
 
63
58
  Metrics/ModuleLength:
64
59
  Max: 100
@@ -66,6 +61,10 @@ Metrics/ModuleLength:
66
61
  Metrics/LineLength:
67
62
  Enabled: false
68
63
 
64
+ Metrics/BlockLength:
65
+ Exclude:
66
+ - spec/**/*_spec.rb
67
+
69
68
  Metrics/MethodLength:
70
69
  Max: 15
71
70
 
@@ -78,10 +77,10 @@ Lint/EndAlignment:
78
77
  Style/FormatString:
79
78
  Enabled: false
80
79
 
81
- Style/MultilineMethodCallIndentation:
80
+ Layout/MultilineMethodCallIndentation:
82
81
  EnforcedStyle: indented
83
82
 
84
- Style/MultilineOperationIndentation:
83
+ Layout/MultilineOperationIndentation:
85
84
  EnforcedStyle: indented
86
85
 
87
86
  Style/WordArray:
@@ -90,7 +89,7 @@ Style/WordArray:
90
89
  Style/RedundantSelf:
91
90
  Enabled: false
92
91
 
93
- Style/AlignHash:
92
+ Layout/AlignHash:
94
93
  Enabled: true
95
94
  EnforcedLastArgumentHashStyle: always_ignore
96
95
 
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,185 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-12-21 23:11:43 +0200 using RuboCop version 0.52.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: Include, TreatCommentsAsGroupSeparators.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'ruby-jwt.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Cop supports --auto-correct.
19
+ Layout/EmptyLines:
20
+ Exclude:
21
+ - 'spec/integration/readme_examples_spec.rb'
22
+
23
+ # Offense count: 1
24
+ # Cop supports --auto-correct.
25
+ # Configuration parameters: EnforcedStyle.
26
+ # SupportedStyles: empty_lines, no_empty_lines
27
+ Layout/EmptyLinesAroundBlockBody:
28
+ Exclude:
29
+ - 'spec/jwt_spec.rb'
30
+
31
+ # Offense count: 1
32
+ # Cop supports --auto-correct.
33
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
34
+ Layout/ExtraSpacing:
35
+ Exclude:
36
+ - 'spec/jwk_spec.rb'
37
+
38
+ # Offense count: 2
39
+ # Cop supports --auto-correct.
40
+ # Configuration parameters: EnforcedStyle.
41
+ # SupportedStyles: normal, rails
42
+ Layout/IndentationConsistency:
43
+ Exclude:
44
+ - 'spec/jwt_spec.rb'
45
+
46
+ # Offense count: 1
47
+ # Cop supports --auto-correct.
48
+ # Configuration parameters: Width, IgnoredPatterns.
49
+ Layout/IndentationWidth:
50
+ Exclude:
51
+ - 'spec/jwt_spec.rb'
52
+
53
+ # Offense count: 3
54
+ # Cop supports --auto-correct.
55
+ Layout/SpaceAfterComma:
56
+ Exclude:
57
+ - 'spec/jwt_spec.rb'
58
+
59
+ # Offense count: 2
60
+ # Cop supports --auto-correct.
61
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
62
+ # SupportedStyles: space, no_space
63
+ # SupportedStylesForEmptyBraces: space, no_space
64
+ Layout/SpaceBeforeBlockBraces:
65
+ Exclude:
66
+ - 'spec/jwk/ec_spec.rb'
67
+ - 'spec/jwt/verify_spec.rb'
68
+
69
+ # Offense count: 1
70
+ # Cop supports --auto-correct.
71
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
72
+ # SupportedStyles: space, no_space
73
+ # SupportedStylesForEmptyBraces: space, no_space
74
+ Layout/SpaceInsideBlockBraces:
75
+ Exclude:
76
+ - 'spec/jwt/verify_spec.rb'
77
+
78
+ # Offense count: 1
79
+ # Cop supports --auto-correct.
80
+ # Configuration parameters: EnforcedStyle.
81
+ # SupportedStyles: final_newline, final_blank_line
82
+ Layout/TrailingBlankLines:
83
+ Exclude:
84
+ - 'bin/console.rb'
85
+
86
+ # Offense count: 3
87
+ # Cop supports --auto-correct.
88
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
89
+ Lint/UnusedBlockArgument:
90
+ Exclude:
91
+ - 'spec/jwk/decode_with_jwk_spec.rb'
92
+ - 'spec/jwk/ec_spec.rb'
93
+ - 'spec/jwt/verify_spec.rb'
94
+
95
+ # Offense count: 2
96
+ Metrics/CyclomaticComplexity:
97
+ Max: 7
98
+
99
+ # Offense count: 1
100
+ Metrics/PerceivedComplexity:
101
+ Max: 8
102
+
103
+ # Offense count: 1
104
+ # Cop supports --auto-correct.
105
+ # Configuration parameters: MaxKeyValuePairs.
106
+ Performance/RedundantMerge:
107
+ Exclude:
108
+ - 'spec/jwt_spec.rb'
109
+
110
+ # Offense count: 1
111
+ # Cop supports --auto-correct.
112
+ Style/Encoding:
113
+ Exclude:
114
+ - 'lib/jwt/version.rb'
115
+
116
+ # Offense count: 1
117
+ # Cop supports --auto-correct.
118
+ # Configuration parameters: InverseMethods, InverseBlocks.
119
+ Style/InverseMethods:
120
+ Exclude:
121
+ - 'spec/jwk/ec_spec.rb'
122
+
123
+ # Offense count: 2
124
+ # Cop supports --auto-correct.
125
+ Style/MethodCallWithoutArgsParentheses:
126
+ Exclude:
127
+ - 'spec/jwt_spec.rb'
128
+
129
+ # Offense count: 2
130
+ # Configuration parameters: EnforcedStyle.
131
+ # SupportedStyles: module_function, extend_self
132
+ Style/ModuleFunction:
133
+ Exclude:
134
+ - 'lib/jwt/algos.rb'
135
+ - 'lib/jwt/signature.rb'
136
+
137
+ # Offense count: 1
138
+ # Cop supports --auto-correct.
139
+ Style/MutableConstant:
140
+ Exclude:
141
+ - 'lib/jwt/version.rb'
142
+
143
+ # Offense count: 1
144
+ # Cop supports --auto-correct.
145
+ # Configuration parameters: Strict.
146
+ Style/NumericLiterals:
147
+ MinDigits: 6
148
+
149
+ # Offense count: 1
150
+ # Cop supports --auto-correct.
151
+ Style/ParallelAssignment:
152
+ Exclude:
153
+ - 'spec/integration/readme_examples_spec.rb'
154
+
155
+ # Offense count: 11
156
+ # Cop supports --auto-correct.
157
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
158
+ # SupportedStyles: single_quotes, double_quotes
159
+ Style/StringLiterals:
160
+ Exclude:
161
+ - 'bin/console.rb'
162
+ - 'spec/jwk/ec_spec.rb'
163
+ - 'spec/jwk/rsa_spec.rb'
164
+ - 'spec/jwk_spec.rb'
165
+ - 'spec/jwt_spec.rb'
166
+
167
+ # Offense count: 1
168
+ # Cop supports --auto-correct.
169
+ # Configuration parameters: EnforcedStyleForMultiline.
170
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
171
+ Style/TrailingCommaInArguments:
172
+ Exclude:
173
+ - 'spec/jwt_spec.rb'
174
+
175
+ # Offense count: 1
176
+ # Cop supports --auto-correct.
177
+ Style/UnlessElse:
178
+ Exclude:
179
+ - 'spec/jwt_spec.rb'
180
+
181
+ # Offense count: 162
182
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
183
+ # URISchemes: http, https
184
+ Metrics/LineLength:
185
+ Max: 420
@@ -6,7 +6,7 @@ engines:
6
6
  enabled: true
7
7
  rubocop:
8
8
  enabled: true
9
- channel: rubocop-0-49
9
+ channel: rubocop-0-52
10
10
  duplication:
11
11
  config:
12
12
  languages:
data/AUTHORS CHANGED
@@ -1,84 +1,112 @@
1
1
  Tim Rudat
2
2
  Jeff Lindsay
3
+ Joakim Antman
3
4
  A.B
4
- Emilio Cristalli
5
+ shields
5
6
  Bob Aman
7
+ Emilio Cristalli
8
+ Egon Zemmer
6
9
  Zane Shannon
7
- Oliver
8
- Paul Battley
9
10
  Nikita Shatov
11
+ Paul Battley
12
+ Oliver
10
13
  blackanger
11
- Tyler Pickett
12
- James Stonehill
13
14
  Adam Michael
15
+ James Stonehill
14
16
  Ville Lautanala
17
+ Tyler Pickett
15
18
  Peter M. Goldstein
16
- Joakim Antman
19
+ Martin Emde
17
20
  Korstiaan de Ridder
18
- Klaas Jan Wierenga
19
- Steve Sloan
21
+ Richard Larocque
22
+ Andrew Davis
20
23
  Bill Mill
21
- Erik Michaels-Ober
24
+ Yason Khaburzaniya
25
+ Steve Sloan
26
+ Nick Hammond
27
+ Antonis Berkakis
28
+ Klaas Jan Wierenga
29
+ yann ARMAND
22
30
  Brian Flethcer
31
+ Erik Michaels-Ober
23
32
  Jurriaan Pruis
24
33
  Kevin Olbrich
25
34
  Larry Lv
26
35
  Rodrigo López Dato
36
+ Simon Fish
27
37
  Steven Davidovitz
28
38
  Tom Wey
39
+ jb08
29
40
  lukas
30
41
  ojab
31
42
  sawyerzhang
43
+ smudge
32
44
  wohlgejm
33
- yann ARMAND
34
- Jordan Brough
35
- Juanito Fatas
36
45
  Julio Lopez
37
- Zuzanna Stolińska
38
46
  Katelyn Kasperowicz
39
- aarongray
40
- B
41
- Adam Greene
47
+ fusagiko/takayamaki
48
+ Dorian Marié
49
+ rono23
50
+ Leonardo Saraiva
42
51
  Lowell Kirsh
43
52
  Lucas Mazza
44
53
  Makoto Chiba
45
54
  Manuel Bustillo
46
55
  Marco Adkins
56
+ Dave Grijalva
47
57
  Micah Gates
58
+ Michał Begejowicz
48
59
  Mike Eirih
49
60
  Mike Pastore
50
61
  Mingan
51
62
  Mitch Birti
63
+ Dan Leyden
52
64
  Nicolas Leger
65
+ Brandon Keepers
66
+ Bouke van der Bijl
67
+ B
68
+ Pierre Michard
69
+ RahulBajaj
53
70
  Austin Kabiru
54
- Artsiom Kuts
55
- Arnaud Mesureur
56
- Ariel Salomon
71
+ Ritikesh
57
72
  Rob Wygand
58
- danielgrippi
73
+ Adam Greene
59
74
  Ryan Brushett
60
75
  Ryan McIlmoyl
61
- Aman Gupta
76
+ Ryan Metzler
77
+ Severin Schoepke
78
+ Shaun Guth
79
+ mai fujii
80
+ Artsiom Kuts
62
81
  Steve Teti
63
- revodoge
64
- Taiki Sugawara
65
82
  nycvotes-dev
66
- Alexandr Kostrikov
83
+ T.J. Schuck
84
+ Taiki Sugawara
85
+ Takehiro Adachi
86
+ Arnaud Mesureur
67
87
  Tobias Haar
68
88
  Toby Pinder
69
- rono23
89
+ revodoge
70
90
  Tomé Duarte
71
91
  Travis Hunter
72
- Alexander Boyd
92
+ Ariel Salomon
93
+ Aman Gupta
94
+ Alexandr Kostrikov
73
95
  Yuji Yaginuma
74
- Ernie Miller
75
- Evgeni Golov
76
- Ewoud Kohl van Wijngaarden
96
+ Alexander Boyd
97
+ Zuzanna Stolińska
98
+ aarongray
99
+ HoneyryderChuck
100
+ Igor Victor
77
101
  Ilyaaaaaaaaaaaaa Zhitomirskiy
78
- Dorian Marié
79
- Dave Grijalva
102
+ Ewoud Kohl van Wijngaarden
103
+ Evgeni Golov
80
104
  Jens Hausherr
81
105
  Jeremiah Wuenschel
82
- Brandon Keepers
106
+ Ernie Miller
83
107
  John Downey
108
+ Jordan Brough
84
109
  Josh Bodah
110
+ JotaSe
111
+ Juanito Fatas
112
+ danielgrippi
data/Appraisals CHANGED
@@ -1,14 +1,10 @@
1
1
  appraise 'standalone' do
2
2
  end
3
3
 
4
- appraise 'rails-5.0' do
5
- gem 'rails', '~> 5.0.0'
4
+ appraise 'openssl' do
5
+ gem 'openssl', '~> 2.1'
6
6
  end
7
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'
8
+ appraise 'rbnacl' do
9
+ gem 'rbnacl'
14
10
  end