mini_auth_rb 0.3.2 → 0.3.3

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: 0b90d8b77cce44d67049557a5aa2fecaff4fb13de9008c27b0fd0fb5ace999e4
4
- data.tar.gz: 35bc5f618a549a68848091bc4ed02a731d198bbe6e05c8b2fa004483e6da3486
3
+ metadata.gz: 919fa5a72eb87d29eea8fc489a43ffdb212cf03da69e05d4a591e712d8d967e1
4
+ data.tar.gz: 78ec2d92b5e96c2589bae970fac6decb5b4625d5674fff973088101048333bca
5
5
  SHA512:
6
- metadata.gz: c5c4d1be7976a86a5ee77e1b25de8639c13e8644a8cf2135829500e2fa4770451ee1404ac6850d9467ae31d979dea69e8d51971b04c165de28fda578737290b7
7
- data.tar.gz: e6a7f512d6efa74baed2518da4b6c046d4c1fa7e1f959ce0ecd3d88824d3cf500c50e02af88620b97fbb628362d0c9bf749aede87f1be869a8777fa06c66004f
6
+ metadata.gz: 713a362162afaab3de8d867e9a0a2f117ce3b8ee0e1a9b55a4011c55ee9e97593127bae2ad39b6b4d41197334403f165272998c19eef3dcb857841b128c52714
7
+ data.tar.gz: f34bd9ee132ca036d8e2405ac30ca59e026fa1fc5988337bf5b7a6bad55e9835bb04569cdbd6f0f70f889e3a034015d8da131c9ee3c9d1a8144bba2f65b36dc4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.3] - 2026-08-19
4
+
5
+ - Reset the per-thread guard cache on the action's own thread via an `around_action`, preventing the authenticated user from leaking across requests under `ActionController::Live`.
6
+
3
7
  ## [0.1.0] - 2022-10-15
4
8
 
5
9
  - Initial release
@@ -4,6 +4,10 @@ module MiniAuth
4
4
  module Guarded
5
5
  extend ActiveSupport::Concern
6
6
 
7
+ included do
8
+ around_action :reset_auth_guards
9
+ end
10
+
7
11
  # @return [MiniAuth::AuthManager]
8
12
  def auth_manager
9
13
  @auth_manager ||= MiniAuth::AuthManager.instance
@@ -43,5 +47,13 @@ module MiniAuth
43
47
  end
44
48
  end
45
49
  end
50
+
51
+ private
52
+
53
+ def reset_auth_guards
54
+ yield
55
+ ensure
56
+ auth_manager.reset_guards!
57
+ end
46
58
  end
47
59
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniAuth
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_auth_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Alhoshaiyan
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-11-27 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: activesupport
@@ -100,7 +99,6 @@ metadata:
100
99
  homepage_uri: https://github.com/ahoshaiyan/mini_auth
101
100
  source_code_uri: https://github.com/ahoshaiyan/mini_auth
102
101
  changelog_uri: https://github.com/ahoshaiyan/mini_auth
103
- post_install_message:
104
102
  rdoc_options: []
105
103
  require_paths:
106
104
  - lib
@@ -115,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
113
  - !ruby/object:Gem::Version
116
114
  version: '0'
117
115
  requirements: []
118
- rubygems_version: 3.1.6
119
- signing_key:
116
+ rubygems_version: 3.6.7
120
117
  specification_version: 4
121
118
  summary: Pragmatic authentication for Ruby on Rails.
122
119
  test_files: []