grape-jwt-authentication 3.3.0 → 3.5.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 +4 -4
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +3 -3
- data/.rubocop.yml +6 -40
- data/Appraisals +0 -6
- data/CHANGELOG.md +9 -0
- data/Dockerfile +1 -1
- data/Envfile +1 -0
- data/Gemfile +2 -2
- data/LICENSE +1 -1
- data/Makefile +3 -2
- data/gemfiles/grape_1.gemfile +2 -2
- data/gemfiles/grape_2.gemfile +2 -2
- data/gemfiles/grape_3.gemfile +2 -2
- data/gemfiles/rails_7.2.gemfile +2 -2
- data/gemfiles/rails_8.0.gemfile +2 -2
- data/gemfiles/rails_8.1.gemfile +2 -2
- data/grape-jwt-authentication.gemspec +2 -2
- data/lib/grape/jwt/authentication/jwt_handler.rb +1 -1
- data/lib/grape/jwt/authentication/version.rb +1 -1
- metadata +4 -6
- data/gemfiles/rails_6.1.gemfile +0 -27
- data/gemfiles/rails_7.1.gemfile +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4f1306d86dec1405d0ae65f640f5f8a058a71af20ac96f1f4f52c824bb0ceda
|
|
4
|
+
data.tar.gz: 1623329cb528b285235b883ec66c78387d6c09ad8c2473c5955a23b1996dcda1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f512a845dc2c3b83ae3b9ca8d13bf11844509516ad9e0bc829113b69bcffaa3f0cee7d8bbf85ca4b28d89b16d3e6d991098a75879d0e2057006211b602e3edcf
|
|
7
|
+
data.tar.gz: 47bfa65cffbee0ddd5dcf0e586bd88db5172eec5c8388a28ca4f0571f399fc7add6977261b8a633bea7ee79d4fb863db6a2aab74b56c23824340efd29e1beb65
|
data/.github/workflows/test.yml
CHANGED
|
@@ -18,8 +18,8 @@ jobs:
|
|
|
18
18
|
strategy:
|
|
19
19
|
fail-fast: false
|
|
20
20
|
matrix:
|
|
21
|
-
ruby: ['3.
|
|
22
|
-
rails: ['7.
|
|
21
|
+
ruby: ['3.3', '3.4', '4.0']
|
|
22
|
+
rails: ['7.2', '8.0', '8.1']
|
|
23
23
|
env:
|
|
24
24
|
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
|
|
25
25
|
steps:
|
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
strategy:
|
|
54
54
|
fail-fast: false
|
|
55
55
|
matrix:
|
|
56
|
-
ruby: ['3.
|
|
56
|
+
ruby: ['3.3', '3.4', '4.0']
|
|
57
57
|
grape: ['1', '2', '3']
|
|
58
58
|
env:
|
|
59
59
|
BUNDLE_GEMFILE: 'gemfiles/grape_${{ matrix.grape }}.gemfile'
|
data/.rubocop.yml
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
inherit_from:
|
|
2
|
+
- https://potpourri.hausgold.de/config/rubocop.yml
|
|
3
|
+
- https://potpourri.hausgold.de/config/rubocop-gem.yml
|
|
4
|
+
|
|
1
5
|
plugins:
|
|
2
6
|
- rubocop-rspec
|
|
3
7
|
- rubocop-rails
|
|
@@ -5,58 +9,24 @@ plugins:
|
|
|
5
9
|
Rails:
|
|
6
10
|
Enabled: true
|
|
7
11
|
|
|
8
|
-
Style/Documentation:
|
|
9
|
-
Enabled: true
|
|
10
|
-
|
|
11
12
|
AllCops:
|
|
12
13
|
NewCops: enable
|
|
13
14
|
SuggestExtensions: false
|
|
14
15
|
DisplayCopNames: true
|
|
15
|
-
TargetRubyVersion: 3.
|
|
16
|
-
TargetRailsVersion: 7.
|
|
16
|
+
TargetRubyVersion: 3.3
|
|
17
|
+
TargetRailsVersion: 7.2
|
|
17
18
|
Exclude:
|
|
18
19
|
- bin/**/*
|
|
19
20
|
- vendor/**/*
|
|
20
21
|
- build/**/*
|
|
21
22
|
- gemfiles/**/*
|
|
22
23
|
|
|
23
|
-
Metrics/BlockLength:
|
|
24
|
-
Exclude:
|
|
25
|
-
- Rakefile
|
|
26
|
-
- '*.gemspec'
|
|
27
|
-
- spec/**/*.rb
|
|
28
|
-
- '**/*.rake'
|
|
29
|
-
- doc/**/*.rb
|
|
30
|
-
|
|
31
|
-
# MFA is not yet enabled for our gems yet.
|
|
32
|
-
Gemspec/RequireMFA:
|
|
33
|
-
Enabled: false
|
|
34
|
-
|
|
35
|
-
# We stay with the original Ruby Style Guide recommendation.
|
|
36
|
-
Layout/LineLength:
|
|
37
|
-
Max: 80
|
|
38
|
-
|
|
39
|
-
# Document all the things.
|
|
40
|
-
Style/DocumentationMethod:
|
|
41
|
-
Enabled: true
|
|
42
|
-
RequireForNonPublicMethods: true
|
|
43
|
-
|
|
44
24
|
# It's a deliberate idiom in RSpec.
|
|
45
25
|
# See: https://github.com/bbatsov/rubocop/issues/4222
|
|
46
26
|
Lint/AmbiguousBlockAssociation:
|
|
47
27
|
Exclude:
|
|
48
28
|
- "spec/**/*"
|
|
49
29
|
|
|
50
|
-
# Because +expect_any_instance_of().to have_received()+ is not
|
|
51
|
-
# supported with the +with(hash_including)+ matchers
|
|
52
|
-
RSpec/MessageSpies:
|
|
53
|
-
EnforcedStyle: receive
|
|
54
|
-
|
|
55
|
-
# Because nesting makes sense here to group the feature tests
|
|
56
|
-
# more effective. This increases maintainability.
|
|
57
|
-
RSpec/NestedGroups:
|
|
58
|
-
Max: 4
|
|
59
|
-
|
|
60
30
|
# Disable regular Rails spec paths.
|
|
61
31
|
Rails/FilePath:
|
|
62
32
|
Enabled: false
|
|
@@ -64,7 +34,3 @@ Rails/FilePath:
|
|
|
64
34
|
# Because we just implemented the ActiveRecord API.
|
|
65
35
|
Rails/SkipsModelValidations:
|
|
66
36
|
Enabled: false
|
|
67
|
-
|
|
68
|
-
# We highly depend on memoized helpers across the specs.
|
|
69
|
-
RSpec/MultipleMemoizedHelpers:
|
|
70
|
-
Enabled: false
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
|
4
4
|
|
|
5
|
+
### 3.5.0 (26 December 2025)
|
|
6
|
+
|
|
7
|
+
* Added Ruby 4.0 support ([#32](https://github.com/hausgold/grape-jwt-authentication/pull/32))
|
|
8
|
+
* Dropped Ruby 3.2 and Rails 7.1 support ([#31](https://github.com/hausgold/grape-jwt-authentication/pull/31))
|
|
9
|
+
|
|
10
|
+
### 3.4.0 (19 December 2025)
|
|
11
|
+
|
|
12
|
+
* Migrated to a shared Rubocop configuration for HAUSGOLD gems ([#30](https://github.com/hausgold/grape-jwt-authentication/pull/30))
|
|
13
|
+
|
|
5
14
|
### 3.3.0 (16 December 2025)
|
|
6
15
|
|
|
7
16
|
* Dropped the unused `httparty` gem ([#29](https://github.com/hausgold/grape-jwt-authentication/pull/29))
|
data/Dockerfile
CHANGED
data/Envfile
CHANGED
data/Gemfile
CHANGED
|
@@ -9,12 +9,12 @@ gemspec
|
|
|
9
9
|
|
|
10
10
|
# Development dependencies
|
|
11
11
|
gem 'appraisal', '~> 2.4'
|
|
12
|
-
gem 'bundler', '
|
|
12
|
+
gem 'bundler', '>= 2.6', '< 5'
|
|
13
13
|
gem 'countless', '~> 2.2'
|
|
14
14
|
gem 'guard-rspec', '~> 4.7'
|
|
15
15
|
gem 'rack', '~> 2.2'
|
|
16
16
|
gem 'rack-test', '~> 2.0'
|
|
17
|
-
gem 'railties', '>= 7.
|
|
17
|
+
gem 'railties', '>= 7.2'
|
|
18
18
|
gem 'rake', '~> 13.0'
|
|
19
19
|
gem 'rspec', '~> 3.12'
|
|
20
20
|
gem 'rubocop'
|
data/LICENSE
CHANGED
data/Makefile
CHANGED
|
@@ -85,7 +85,8 @@ all:
|
|
|
85
85
|
install:
|
|
86
86
|
# Install the dependencies
|
|
87
87
|
@$(MKDIR) -p $(VENDOR_DIR)
|
|
88
|
-
@$(call run-shell,$(BUNDLE)
|
|
88
|
+
@$(call run-shell,$(BUNDLE) config set --local path '$(VENDOR_DIR)')
|
|
89
|
+
@$(call run-shell,$(BUNDLE) check || $(BUNDLE) install)
|
|
89
90
|
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
|
|
90
91
|
|
|
91
92
|
update:
|
|
@@ -117,7 +118,7 @@ test-style: \
|
|
|
117
118
|
test-style-ruby:
|
|
118
119
|
# Run the static code analyzer (rubocop)
|
|
119
120
|
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
|
|
120
|
-
|| ($(TEST) $$($(RUBY_VERSION)) != '3.
|
|
121
|
+
|| ($(TEST) $$($(RUBY_VERSION)) != '3.3' && true))
|
|
121
122
|
|
|
122
123
|
clean:
|
|
123
124
|
# Clean the dependencies
|
data/gemfiles/grape_1.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
data/gemfiles/grape_2.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
data/gemfiles/grape_3.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
data/gemfiles/rails_7.2.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
data/gemfiles/rails_8.0.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
data/gemfiles/rails_8.1.gemfile
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "
|
|
6
|
+
gem "bundler", ">= 2.6", "< 5"
|
|
7
7
|
gem "countless", "~> 2.2"
|
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
|
9
9
|
gem "rack", "~> 2.2"
|
|
10
10
|
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.
|
|
11
|
+
gem "railties", ">= 7.2"
|
|
12
12
|
gem "rake", "~> 13.0"
|
|
13
13
|
gem "rspec", "~> 3.12"
|
|
14
14
|
gem "rubocop"
|
|
@@ -31,9 +31,9 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
32
32
|
spec.require_paths = ['lib']
|
|
33
33
|
|
|
34
|
-
spec.required_ruby_version = '>= 3.
|
|
34
|
+
spec.required_ruby_version = '>= 3.3'
|
|
35
35
|
|
|
36
|
-
spec.add_dependency 'activesupport', '>= 7.
|
|
36
|
+
spec.add_dependency 'activesupport', '>= 7.2'
|
|
37
37
|
spec.add_dependency 'grape', '>= 1.0', '< 4.0'
|
|
38
38
|
spec.add_dependency 'jwt', '>= 2.6'
|
|
39
39
|
spec.add_dependency 'keyless', '~> 2.3'
|
|
@@ -122,7 +122,7 @@ module Grape
|
|
|
122
122
|
inject_token_into_env(env, token)
|
|
123
123
|
|
|
124
124
|
# Give the parsed token to the user defined block
|
|
125
|
-
# for
|
|
125
|
+
# for further verification. The user given block MUST return
|
|
126
126
|
# a positive result to allow the request to be further
|
|
127
127
|
# processed, or a negative result to stop processing.
|
|
128
128
|
raise AuthenticationError unless authenticator.call(token)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grape-jwt-authentication
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hermann Mayer
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '7.
|
|
18
|
+
version: '7.2'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '7.
|
|
25
|
+
version: '7.2'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: grape
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -149,8 +149,6 @@ files:
|
|
|
149
149
|
- gemfiles/grape_1.gemfile
|
|
150
150
|
- gemfiles/grape_2.gemfile
|
|
151
151
|
- gemfiles/grape_3.gemfile
|
|
152
|
-
- gemfiles/rails_6.1.gemfile
|
|
153
|
-
- gemfiles/rails_7.1.gemfile
|
|
154
152
|
- gemfiles/rails_7.2.gemfile
|
|
155
153
|
- gemfiles/rails_8.0.gemfile
|
|
156
154
|
- gemfiles/rails_8.1.gemfile
|
|
@@ -175,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
175
173
|
requirements:
|
|
176
174
|
- - ">="
|
|
177
175
|
- !ruby/object:Gem::Version
|
|
178
|
-
version: '3.
|
|
176
|
+
version: '3.3'
|
|
179
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
178
|
requirements:
|
|
181
179
|
- - ">="
|
data/gemfiles/rails_6.1.gemfile
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "~> 2.3"
|
|
7
|
-
gem "countless", "~> 1.1"
|
|
8
|
-
gem "guard-rspec", "~> 4.7"
|
|
9
|
-
gem "rack", "~> 2.2"
|
|
10
|
-
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 6.1"
|
|
12
|
-
gem "rake", "~> 13.0"
|
|
13
|
-
gem "rspec", "~> 3.12"
|
|
14
|
-
gem "rubocop"
|
|
15
|
-
gem "rubocop-rails"
|
|
16
|
-
gem "rubocop-rspec"
|
|
17
|
-
gem "simplecov", ">= 0.22"
|
|
18
|
-
gem "timecop", ">= 0.9.6"
|
|
19
|
-
gem "vcr", "~> 6.0"
|
|
20
|
-
gem "webmock", "~> 3.18"
|
|
21
|
-
gem "yard", ">= 0.9.28"
|
|
22
|
-
gem "yard-activesupport-concern", ">= 0.0.1"
|
|
23
|
-
gem "activejob", "~> 6.1.0"
|
|
24
|
-
gem "activerecord", "~> 6.1.0"
|
|
25
|
-
gem "activesupport", "~> 6.1.0"
|
|
26
|
-
|
|
27
|
-
gemspec path: "../"
|
data/gemfiles/rails_7.1.gemfile
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# This file was generated by Appraisal
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gem "appraisal", "~> 2.4"
|
|
6
|
-
gem "bundler", "~> 2.6"
|
|
7
|
-
gem "countless", "~> 2.2"
|
|
8
|
-
gem "guard-rspec", "~> 4.7"
|
|
9
|
-
gem "rack", "~> 2.2"
|
|
10
|
-
gem "rack-test", "~> 2.0"
|
|
11
|
-
gem "railties", ">= 7.1"
|
|
12
|
-
gem "rake", "~> 13.0"
|
|
13
|
-
gem "rspec", "~> 3.12"
|
|
14
|
-
gem "rubocop"
|
|
15
|
-
gem "rubocop-rails"
|
|
16
|
-
gem "rubocop-rspec"
|
|
17
|
-
gem "simplecov", ">= 0.22"
|
|
18
|
-
gem "timecop", ">= 0.9.6"
|
|
19
|
-
gem "vcr", "~> 6.0"
|
|
20
|
-
gem "webmock", "~> 3.18"
|
|
21
|
-
gem "yard", ">= 0.9.28"
|
|
22
|
-
gem "yard-activesupport-concern", ">= 0.0.1"
|
|
23
|
-
gem "activejob", "~> 7.1.0"
|
|
24
|
-
gem "activerecord", "~> 7.1.0"
|
|
25
|
-
gem "activesupport", "~> 7.1.0"
|
|
26
|
-
|
|
27
|
-
gemspec path: "../"
|