verikloak-rails 0.2.2 → 0.2.4

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: e588f4e83d324112c789986e02a9a2acab3de3a06a1b5f516da2fefe9439e4b4
4
- data.tar.gz: e1e59805c5af304ecf4349f5d2031faa79a7e7b5c13188dd32e7866a4f42eb0d
3
+ metadata.gz: 3f102e217c566e0cbe01b75979d16fd5636449c8cc38f58e35d8147be44d05d8
4
+ data.tar.gz: 1426fccde358d9d5440b99749debff98775cbb8d2e8492be96bf468df2ff259f
5
5
  SHA512:
6
- metadata.gz: 4af9b198e39240cc234c96b897549f893680a45f45223cc0bd9c09ad40139627e8f01a8fb5374c517adadf28aaaee498d189d765eab33ba5a9e5bf42b4e748ed
7
- data.tar.gz: 77a17a8d8a44d3b92d8dee19b5e9e7940cd2ddc676166790a5c17cc8ba5064690db080b563b0d38ea7a9ef3ac75e977f6328d0e5cb8c41dd13c6710dc51a83da
6
+ metadata.gz: c72c02908f4f946f4455b80341858cf329261c7d6da24d6ac6c6ab6ca484e636c45e6bf5e5ed23c29073c327e9338e7c42189e33e942ed5192b4792c44dd7ea4
7
+ data.tar.gz: 9bae0bcc441bb9544a7365056f3ddf214bfe0ca4c8345c98d78ce6727cfca77ea6ad5a5511c415542f1882af7a996ce999e4e2912fc9c5203018d7d47b8d6007
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+
9
+ ## [0.2.4] - 2025-09-23
10
+
11
+ ### Fixed
12
+ - Package the installer template so `rails g verikloak:install` works in packaged gems (no more missing `initializer.rb.erb`).
13
+
14
+ ---
15
+
16
+ ## [0.2.3] - 2025-09-22
17
+
18
+ ### Changed
19
+ - Provide a safe default audience (`'rails-api'`) so fresh installs keep `Verikloak::Middleware` active and remain compatible with the optional `verikloak-audience` gem.
20
+
8
21
  ---
9
22
 
10
23
  ## [0.2.2] - 2025-09-21
data/README.md CHANGED
@@ -106,7 +106,7 @@ Keys under `config.verikloak`:
106
106
  | Key | Type | Description | Default |
107
107
  | --- | --- | --- | --- |
108
108
  | `discovery_url` | String | OIDC discovery URL | `nil` |
109
- | `audience` | String or Array | Expected `aud` | `nil` |
109
+ | `audience` | String or Array | Expected `aud` | `'rails-api'` |
110
110
  | `issuer` | String | Expected `iss` | `nil` |
111
111
  | `leeway` | Integer | Clock skew allowance (seconds) | `60` |
112
112
  | `skip_paths` | Array<String> | Paths to skip verification | `['/up','/health','/rails/health']` |
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.configure do
4
+ config.verikloak.discovery_url = ENV.fetch('KEYCLOAK_DISCOVERY_URL', nil)
5
+ config.verikloak.audience = ENV.fetch('VERIKLOAK_AUDIENCE', 'rails-api')
6
+ config.verikloak.issuer = ENV.fetch('VERIKLOAK_ISSUER', nil)
7
+ config.verikloak.leeway = Integer(ENV.fetch('VERIKLOAK_LEEWAY', '60'))
8
+ config.verikloak.skip_paths = %w[/up /health /rails/health]
9
+
10
+ config.verikloak.logger_tags = %i[request_id sub]
11
+ config.verikloak.auto_include_controller = true
12
+ config.verikloak.render_500_json = ENV.fetch('VERIKLOAK_RENDER_500', 'false') == 'true'
13
+ config.verikloak.rescue_pundit = ENV.fetch('VERIKLOAK_RESCUE_PUNDIT', 'true') == 'true'
14
+ end
@@ -65,7 +65,7 @@ module Verikloak
65
65
  # @return [void]
66
66
  def initialize
67
67
  @discovery_url = nil
68
- @audience = nil
68
+ @audience = 'rails-api'
69
69
  @issuer = nil
70
70
  @leeway = 60
71
71
  @skip_paths = ['/up', '/health', '/rails/health']
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Verikloak
4
4
  module Rails
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verikloak-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - taiyaky
@@ -9,6 +9,26 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rack
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '2.2'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '4.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '2.2'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '4.0'
12
32
  - !ruby/object:Gem::Dependency
13
33
  name: rails
14
34
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +55,7 @@ dependencies:
35
55
  requirements:
36
56
  - - ">="
37
57
  - !ruby/object:Gem::Version
38
- version: 0.1.5
58
+ version: 0.2.0
39
59
  - - "<"
40
60
  - !ruby/object:Gem::Version
41
61
  version: 1.0.0
@@ -45,7 +65,7 @@ dependencies:
45
65
  requirements:
46
66
  - - ">="
47
67
  - !ruby/object:Gem::Version
48
- version: 0.1.5
68
+ version: 0.2.0
49
69
  - - "<"
50
70
  - !ruby/object:Gem::Version
51
71
  version: 1.0.0
@@ -59,6 +79,7 @@ files:
59
79
  - LICENSE
60
80
  - README.md
61
81
  - lib/generators/verikloak/install/install_generator.rb
82
+ - lib/generators/verikloak/install/templates/initializer.rb.erb
62
83
  - lib/verikloak-rails.rb
63
84
  - lib/verikloak/rails.rb
64
85
  - lib/verikloak/rails/configuration.rb
@@ -73,7 +94,7 @@ metadata:
73
94
  source_code_uri: https://github.com/taiyaky/verikloak-rails
74
95
  changelog_uri: https://github.com/taiyaky/verikloak-rails/blob/main/CHANGELOG.md
75
96
  bug_tracker_uri: https://github.com/taiyaky/verikloak-rails/issues
76
- documentation_uri: https://rubydoc.info/gems/verikloak-rails/0.2.2
97
+ documentation_uri: https://rubydoc.info/gems/verikloak-rails/0.2.4
77
98
  rubygems_mfa_required: 'true'
78
99
  rdoc_options: []
79
100
  require_paths: