verikloak-rails 0.2.5 → 0.2.6

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: 59774b369340238296ec1189c9512e674738abfcb26546103ebe56fd090b1c98
4
- data.tar.gz: 0dcea3b1e940545a5213dadb253bc0152168eefad534d9ef8fc6c547491f783b
3
+ metadata.gz: a6126b5013614bb5cb7c0594126c21456db9762a9e3d307108e5f8c1ce197155
4
+ data.tar.gz: e8504432260a732881946e72cb5551e00178108ba641b802b78c4ca42879e664
5
5
  SHA512:
6
- metadata.gz: b4e0710f56702485f068937a9a3d0cfabe53694fbf1cf408de1be80d56dbdb5fd1b45ed2c280f0e3627b050f5d34c35c696ab885821757b082f6033b2b2a4608
7
- data.tar.gz: 465c2f918d008ca326f67a5247c7da85655cb7544c18b3b787d6fde9ab47be661b455b5a7cbbccd98c18f1b4482707bd06e9e9a381ca2f94ed08d7d0e6448c32
6
+ metadata.gz: ecaf3de303c489d429c6157232f3159333ddec36e87ac0499784181e944c9fe25f59aceb72452b69f297bc7ff0761c069df13cf78ab776c5311a04d6d6c0e9be
7
+ data.tar.gz: e335daefda43368d7c0b58b87372214a8e999bad0424c7e5e2e4e5d5f1ced49b51190e900865ff34d1a277a72eb6fd172b64fc559f0eb246fac4f1d114902bfc
data/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.2.6] - 2025-09-23
11
+
12
+ ### Fixed
13
+ - Leave `config.verikloak.rescue_pundit` commented in the installer initializer so `verikloak-pundit` can automatically disable the built-in rescue.
14
+
15
+ ### Documentation
16
+ - Align README compatibility with the current `verikloak` dependency range.
17
+ - Clarify how the Pundit rescue interacts with the optional `verikloak-pundit` gem and adjust examples accordingly.
18
+
10
19
  ## [0.2.5] - 2025-09-23
11
20
 
12
21
  ### Added
data/README.md CHANGED
@@ -21,7 +21,7 @@ Provide drop-in, token-based authentication for Rails APIs via Verikloak (OIDC d
21
21
  ## Compatibility
22
22
  - Ruby: >= 3.1
23
23
  - Rails: 6.1 – 8.x
24
- - verikloak: >= 0.1.2, < 0.2
24
+ - verikloak: >= 0.2.0, < 1.0.0
25
25
 
26
26
  ## Quick Start
27
27
  ```bash
@@ -114,7 +114,7 @@ Keys under `config.verikloak`:
114
114
  | `error_renderer` | Object responding to `render(controller, error)` | Override error rendering | built-in JSON renderer |
115
115
  | `auto_include_controller` | Boolean | Auto-include controller concern | `true` |
116
116
  | `render_500_json` | Boolean | Rescue `StandardError`, log the exception, and render JSON 500 | `false` |
117
- | `rescue_pundit` | Boolean | Rescue `Pundit::NotAuthorizedError` to 403 JSON when Pundit is present (auto-disabled when `verikloak-pundit` is loaded) | `true` |
117
+ | `rescue_pundit` | Boolean | Rescue `Pundit::NotAuthorizedError` to 403 JSON when Pundit is present<br/>(auto-disabled when `verikloak-pundit` is loaded and the initializer leaves it unset) | `true` |
118
118
  | `middleware_insert_before` | Object/String/Symbol | Insert `Verikloak::Middleware` before this Rack middleware | `nil` |
119
119
  | `middleware_insert_after` | Object/String/Symbol | Insert `Verikloak::Middleware` after this Rack middleware (`Rails::Rack::Logger` when `nil`) | `nil` |
120
120
  | `auto_insert_bff_header_guard` | Boolean | Auto insert `Verikloak::Bff::HeaderGuard` when the gem is present | `true` |
@@ -157,8 +157,9 @@ Rails.application.configure do
157
157
  config.verikloak.logger_tags = %i[request_id sub]
158
158
  config.verikloak.render_500_json = ENV.fetch('VERIKLOAK_RENDER_500', 'false') == 'true'
159
159
 
160
- # Optional Pundit rescue (403 JSON)
161
- config.verikloak.rescue_pundit = ENV.fetch('VERIKLOAK_RESCUE_PUNDIT', 'true') == 'true'
160
+ # Optional Pundit rescue (403 JSON). Leave commented if you use
161
+ # verikloak-pundit so it can disable the built-in handler automatically.
162
+ # config.verikloak.rescue_pundit = ENV.fetch('VERIKLOAK_RESCUE_PUNDIT', 'true') == 'true'
162
163
  end
163
164
  ```
164
165
 
@@ -232,10 +233,10 @@ end
232
233
  ## Optional Pundit Rescue
233
234
  If the `pundit` gem is present, `Pundit::NotAuthorizedError` is rescued to a standardized 403 JSON. This is a lightweight convenience only; deeper Pundit integration (policies, helpers) is out of scope and can live in a separate plugin.
234
235
 
235
- When the optional [`verikloak-pundit`](https://github.com/taiyaky/verikloak-pundit) gem is loaded, the built-in rescue is automatically disabled to avoid double-handling errors. Explicitly set `config.verikloak.rescue_pundit` if you prefer different behavior.
236
+ When the optional [`verikloak-pundit`](https://github.com/taiyaky/verikloak-pundit) gem is loaded, the built-in rescue is automatically disabled to avoid double-handling errors—as long as the initializer leaves `config.verikloak.rescue_pundit` unset. Uncomment the initializer line (or set the value elsewhere) if you prefer different behavior.
236
237
 
237
238
  ### Toggle
238
- Toggle with `config.verikloak.rescue_pundit` (default: true unless overridden by `verikloak-pundit`). Environment example:
239
+ Toggle with `config.verikloak.rescue_pundit` (default: true; leave unset to allow `verikloak-pundit` to disable it). Environment example:
239
240
 
240
241
  ```ruby
241
242
  # config/initializers/verikloak.rb
@@ -26,7 +26,7 @@ module Verikloak
26
26
  ✅ verikloak: initializer created.
27
27
 
28
28
  Next steps:
29
- 1) Ensure the base gem is installed: gem 'verikloak', '>= 0.1.2', '< 0.2'
29
+ 1) Ensure the base gem is installed: gem 'verikloak', '>= 0.2.0', '< 1.0.0'
30
30
  2) Set discovery_url / audience in config/initializers/verikloak.rb
31
31
  3) (Optional) If you disable auto-include, add this line to ApplicationController:
32
32
  include Verikloak::Rails::Controller
@@ -10,5 +10,8 @@ Rails.application.configure do
10
10
  config.verikloak.logger_tags = %i[request_id sub]
11
11
  config.verikloak.auto_include_controller = true
12
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'
13
+
14
+ # Optional Pundit rescue (403 JSON). Leave commented so `verikloak-pundit`
15
+ # can auto-disable the built-in handler when it is on the load path.
16
+ # config.verikloak.rescue_pundit = ENV.fetch('VERIKLOAK_RESCUE_PUNDIT', 'true') == 'true'
14
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Verikloak
4
4
  module Rails
5
- VERSION = '0.2.5'
5
+ VERSION = '0.2.6'
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.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - taiyaky
@@ -94,7 +94,7 @@ metadata:
94
94
  source_code_uri: https://github.com/taiyaky/verikloak-rails
95
95
  changelog_uri: https://github.com/taiyaky/verikloak-rails/blob/main/CHANGELOG.md
96
96
  bug_tracker_uri: https://github.com/taiyaky/verikloak-rails/issues
97
- documentation_uri: https://rubydoc.info/gems/verikloak-rails/0.2.5
97
+ documentation_uri: https://rubydoc.info/gems/verikloak-rails/0.2.6
98
98
  rubygems_mfa_required: 'true'
99
99
  rdoc_options: []
100
100
  require_paths: