jwk-loader 1.0.0 → 1.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: cc35d8bbe5c77c12e387ee48e54543073527d3851148d6c313cd062e7da5de5d
4
- data.tar.gz: 9ee9af3ebd760f4608265ba99a845427d5a047c0a5fe1ded70297f6f408a8838
3
+ metadata.gz: 67a15a343d854ec41ad0a81e27bb56d1d31d4ffbeba011f07297fc97476f3527
4
+ data.tar.gz: 5bf06d581feafa9d0e8596beea16cf09edd2589ec09cf7934d1451a706320843
5
5
  SHA512:
6
- metadata.gz: 7c1da1b6d607b9006a3b8efe55bac39bf8d61db95d137db6705d9eb08ba5eb3340bb66fbad2b15945c4abdf8550143a75b8d34b80975c159baeb11728808c0e6
7
- data.tar.gz: 2d14daadf7bf995b2324b3c9ccf46bc2cc67ecc4c00314e20dcc0d01a866dda2056d0b3f5e83a4df00d9f7c0ca02c9154714f2299481c41707a35f80b763cfc6
6
+ metadata.gz: ec4bbbeadaba81fb48a30958d3e1ee1393b82bb96094b995f2f2fdd85ce91cab0bbe39a361aa065b1da4f87a94ccfd954fd199b46d0a4339554bb53bc78487e6
7
+ data.tar.gz: df1a43c04b157c052593e3bcb1acc12df6d219fe62f33af53652ee5d6ce49054b6a0d3605775ed41a8b22eb39bc3329a957e75d33a49feb26c3dbdde7770f745
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.2.0"
3
+ }
data/CHANGELOG.md CHANGED
@@ -1,14 +1,33 @@
1
- ## [Unreleased]
1
+ # Changelog
2
2
 
3
- ## [1.0.0] - 2023-12-28
3
+ ## [1.2.0](https://github.com/anakinj/jwk-loader/compare/v1.1.0...v1.2.0) (2025-07-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * Allow jwt 3 ([#12](https://github.com/anakinj/jwk-loader/issues/12)) ([6c8b0f9](https://github.com/anakinj/jwk-loader/commit/6c8b0f9164b104921f1b509d2935bf61562e9d57))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * CI for Ruby 3.5 ([#13](https://github.com/anakinj/jwk-loader/issues/13)) ([b7c0ed1](https://github.com/anakinj/jwk-loader/commit/b7c0ed1dc3f31df9464275ad681f53ee14fb794c))
14
+
15
+ ## [1.1.0](https://github.com/anakinj/jwk-loader/compare/v1.0.0...v1.1.0) (2024-08-10)
16
+
17
+
18
+ ### Features
19
+
20
+ * Official support for Ruby 3.2 and 3.3 ([2f6079f](https://github.com/anakinj/jwk-loader/commit/2f6079fd490a4918524974ffb1d897abbf875787))
21
+
22
+ ## [1.0.0](https://github.com/anakinj/jwk-loader/compare/v0.1.1...v1.0.0) (2023-12-28)
23
+
24
+ ### Features
4
25
 
5
26
  - `jwk_loader/test` for convenience for testing without external dependencies. [#6](https://github.com/anakinj/jwk-loader/pull/6) ([@anakinj](https://github.com/anakinj))
6
27
  - Serialize the cached key sets into `JWT::JWK:Set` to avoid generating OpenSSL PKeys for each time the keys are used. [#6](https://github.com/anakinj/jwk-loader/pull/6) ([@anakinj](https://github.com/anakinj))
7
28
 
8
- ## [0.1.1] - 2022-08-26
29
+ ## [1.0.0](https://github.com/anakinj/jwk-loader/compare/v0.1.0...v0.1.1) (2022-08-26)
9
30
 
10
- - make sure 'net/http' is required [#2](https://github.com/anakinj/jwk-loader/pull/2) ([@lukad](https://github.com/lukad)).
11
-
12
- ## [0.1.0] - 2022-07-06
31
+ ### Fixes
13
32
 
14
- - Initial release
33
+ - make sure 'net/http' is required [#2](https://github.com/anakinj/jwk-loader/pull/2) ([@lukad](https://github.com/lukad)).
data/Gemfile CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in jwk-loader.gemspec
6
5
  gemspec
7
6
 
8
- gem "rake", "~> 13.0"
9
- gem "rspec", "~> 3.0"
10
- gem "rubocop", "~> 1.32.0"
7
+ gem "cgi"
8
+ gem "rake"
9
+ gem "rspec"
10
+ gem "rubocop"
11
11
  gem "simplecov"
12
12
  gem "vcr"
13
13
  gem "webmock"
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- # JwkLoader
1
+ # jwk-loader
2
2
 
3
- This gem can be used in combination with the [jwt](https://rubygems.org/gems/jwt) gem as the mechanism to load and cache the JWKs in the application.
3
+ [![Gem Version](https://badge.fury.io/rb/jwk-loader.svg)](https://badge.fury.io/rb/jwk-loader)
4
+ [![Build status](https://github.com/anakinj/jwk-loader/actions/workflows/test.yml/badge.svg)](https://github.com/anakinj/jwk-loader/actions/workflows/test.yml)
5
+
6
+ This gem can be used in combination with the [ruby-jwt](https://rubygems.org/gems/jwt) gem as the mechanism to load and cache the JWKs.
4
7
 
5
8
  ## Installation
6
9
 
@@ -34,7 +37,7 @@ RSpec.describe 'GET /protected' do
34
37
  include JwkLoader::Test
35
38
 
36
39
  context 'when called with a valid token' do
37
- let(:token) { sign_test_token(token_payload: { user_id: 'user' }, jwk_endpoint: 'https://url/to/public/jwks') }
40
+ let(:token) { sign_test_token(token_payload: { user_id: "user" }, jwk_endpoint: "https://url/to/public/jwks") }
38
41
  subject(:response) { get('/protected', { 'HTTP_AUTHORIZATION' => "Bearer #{token}" }) }
39
42
 
40
43
  it 'is a success' do
data/jwk-loader.gemspec CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ["lib"]
34
34
  spec.add_dependency "concurrent-ruby"
35
- spec.add_dependency "jwt", "~> 2.6"
35
+ spec.add_dependency "jwt", [">= 2.6", "< 4.0"]
36
36
  end
@@ -4,7 +4,7 @@ module JwkLoader
4
4
  class Config
5
5
  class ConfigurationNotFound < JwkLoader::Error
6
6
  def initialize(key)
7
- super "Configuration for #{key} not available"
7
+ super("Configuration for #{key} not available")
8
8
  end
9
9
  end
10
10
 
@@ -22,7 +22,10 @@ module JwkLoader
22
22
  send(:[], name, *args)
23
23
  end
24
24
 
25
- def respond_to_missing?(_name, _include_private)
25
+ def respond_to_missing?(name, _include_private)
26
+ # Don't claim to respond to Ruby's internal methods
27
+ return false if name.to_s.start_with?("instance_variables_")
28
+
26
29
  true
27
30
  end
28
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JwkLoader
4
- VERSION = "1.0.0"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -0,0 +1,9 @@
1
+ {
2
+ "release-type": "ruby",
3
+ "include-v-in-tag": true,
4
+ "packages": {
5
+ ".": {
6
+ "version-file": "lib/jwk_loader/version.rb"
7
+ }
8
+ }
9
+ }
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwk-loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Antman
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-12-28 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
13
  name: concurrent-ruby
@@ -28,23 +27,29 @@ dependencies:
28
27
  name: jwt
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - "~>"
30
+ - - ">="
32
31
  - !ruby/object:Gem::Version
33
32
  version: '2.6'
33
+ - - "<"
34
+ - !ruby/object:Gem::Version
35
+ version: '4.0'
34
36
  type: :runtime
35
37
  prerelease: false
36
38
  version_requirements: !ruby/object:Gem::Requirement
37
39
  requirements:
38
- - - "~>"
40
+ - - ">="
39
41
  - !ruby/object:Gem::Version
40
42
  version: '2.6'
41
- description:
43
+ - - "<"
44
+ - !ruby/object:Gem::Version
45
+ version: '4.0'
42
46
  email:
43
47
  - antmanj@gmail.com
44
48
  executables: []
45
49
  extensions: []
46
50
  extra_rdoc_files: []
47
51
  files:
52
+ - ".release-please-manifest.json"
48
53
  - ".rspec"
49
54
  - ".rubocop.yml"
50
55
  - CHANGELOG.md
@@ -62,6 +67,7 @@ files:
62
67
  - lib/jwk_loader/memory_cache.rb
63
68
  - lib/jwk_loader/test.rb
64
69
  - lib/jwk_loader/version.rb
70
+ - release-please-config.json
65
71
  homepage: https://github.com/anakinj/jwk-loader
66
72
  licenses:
67
73
  - MIT
@@ -69,9 +75,8 @@ metadata:
69
75
  allowed_push_host: https://rubygems.org
70
76
  homepage_uri: https://github.com/anakinj/jwk-loader
71
77
  source_code_uri: https://github.com/anakinj/jwk-loader
72
- changelog_uri: https://github.com/anakinj/jwk-loader/blob/1.0.0/CHANGELOG.md
78
+ changelog_uri: https://github.com/anakinj/jwk-loader/blob/1.2.0/CHANGELOG.md
73
79
  rubygems_mfa_required: 'true'
74
- post_install_message:
75
80
  rdoc_options: []
76
81
  require_paths:
77
82
  - lib
@@ -86,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
91
  - !ruby/object:Gem::Version
87
92
  version: '0'
88
93
  requirements: []
89
- rubygems_version: 3.3.7
90
- signing_key:
94
+ rubygems_version: 3.6.7
91
95
  specification_version: 4
92
96
  summary: Tooling for handling JWK loading, parsing and caching
93
97
  test_files: []