moj-simple-jwt-auth 0.1.0 → 0.2.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: bf8744635db729d18bf593eba9663a9ac97aec840d32979b5479c648cedadae3
4
- data.tar.gz: 30179bd0b458b5d6d7fe549cae2011a411dfbe7817a8eca3f0ec75af4a65a39a
3
+ metadata.gz: 60dcec9d18f24f29367e1d83d17c3c3309ec1ca09bc556390181b05bda6f7279
4
+ data.tar.gz: 981c1cd77b2e674184d07b4ca70c3c87657f8c4ec5e997a44c05f1ae8fabf08a
5
5
  SHA512:
6
- metadata.gz: 815cdff869c192660599ca3df0e96fb2703ce5e2d23acf8d7ea3c36e1dd912383a1222da1e7bb7c782861f0bea71e7c4da8fdf5197b0ef9ecba60016633f1f3f
7
- data.tar.gz: df82ee40efefc2d8a50aff0b632bc9330f8c2f6d6f3d353a4bdee7826beca8c7caaec96b1b24930b70b1eb32986fd661b6306b26d666aceb8be543594b52c6ff
6
+ metadata.gz: aa4da80b4fef3838177b572d7c8b257a9827a51ad2435f4e85dc030403bd0c2f7704fbd4aa1250526f1489f41f48140683431bb8bea78b40f1c77f97ac259e62
7
+ data.tar.gz: 13b5b74a4e4e9a43d2b45480077676d9c9331785709310241c017e93995ed96aca8771ae115f194da36422ea70fc9fc6c13fc1c94b1bb6c8a313e72346c40549
@@ -13,7 +13,7 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- ruby: ['3.0.4', '3.1.2']
16
+ ruby: ['3.3', '3.4', '3.5']
17
17
 
18
18
  steps:
19
19
  - uses: actions/checkout@v3
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.0
2
+ TargetRubyVersion: 3.3
3
3
  SuggestExtensions: false
4
4
  NewCops: enable
5
5
  Exclude:
@@ -4,6 +4,10 @@ module SimpleJwtAuth
4
4
  module Middleware
5
5
  module Grape
6
6
  class Authorisation < ::Grape::Middleware::Base
7
+ def initialize(app, options = nil)
8
+ super(app, **(options || {}))
9
+ end
10
+
7
11
  def before
8
12
  return if test_env? || consumer_authorised?
9
13
 
@@ -3,10 +3,14 @@
3
3
  module SimpleJwtAuth
4
4
  module Middleware
5
5
  module Grape
6
- class Jwt < ::Grape::Middleware::Auth::Base
6
+ class Jwt < ::Grape::Middleware::Base
7
7
  ENV_AUTH_KEY = 'HTTP_AUTHORIZATION'
8
8
  ENV_PAYLOAD_KEY = 'grape_jwt.payload'
9
9
 
10
+ def initialize(app, options = nil)
11
+ super(app, **(options || {}))
12
+ end
13
+
10
14
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
11
15
  def call(env)
12
16
  return app.call(env) if test_env?(env)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleJwtAuth
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.bindir = 'exe'
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
- spec.required_ruby_version = '>= 3.0.0'
29
+ spec.required_ruby_version = '>= 3.3.4'
30
30
 
31
31
  spec.add_dependency 'json'
32
32
  spec.add_dependency 'jwt'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moj-simple-jwt-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesus Laiz
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-04-27 00:00:00.000000000 Z
10
+ date: 2026-07-08 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: json
@@ -38,7 +37,6 @@ dependencies:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
- description:
42
40
  email:
43
41
  - zheileman@users.noreply.github.com
44
42
  executables: []
@@ -74,7 +72,6 @@ licenses:
74
72
  - MIT
75
73
  metadata:
76
74
  rubygems_mfa_required: 'true'
77
- post_install_message:
78
75
  rdoc_options: []
79
76
  require_paths:
80
77
  - lib
@@ -82,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
79
  requirements:
83
80
  - - ">="
84
81
  - !ruby/object:Gem::Version
85
- version: 3.0.0
82
+ version: 3.3.4
86
83
  required_rubygems_version: !ruby/object:Gem::Requirement
87
84
  requirements:
88
85
  - - ">="
89
86
  - !ruby/object:Gem::Version
90
87
  version: '0'
91
88
  requirements: []
92
- rubygems_version: 3.3.7
93
- signing_key:
89
+ rubygems_version: 3.6.2
94
90
  specification_version: 4
95
91
  summary: Simple JWT Auth ruby gem with middleware for Faraday and Grape.
96
92
  test_files: []