foobara-auth-http 0.1.1 → 0.1.2

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: b560d7ee6971787591dc89f1633fbf2e7a94342201e8a9dcf0e64590decc28bb
4
- data.tar.gz: 4c7ea4a062a2e58e332fba9a83d300cbb47000db2f3e0566704a8bd5329c9895
3
+ metadata.gz: 016bcd816d77d49551a798013b1f1dc00a2b90999c7495b780d75262e8a847af
4
+ data.tar.gz: f3ea2ca603b95d0f31d38f46496cc95475a07d0c7fa9eaa1fdbd50f30ea566f0
5
5
  SHA512:
6
- metadata.gz: 909ad7cbc1048851904c69aec412fec01980fbfb8eb5978ef699c8820b266c38dbd6110ab188de206baf934258b551131ec64d48de7d03434c59f3db846ec777
7
- data.tar.gz: 3f6944615986d90e65f5baa943d8f73f016b264b259f729ff0881652ca5fcce7860dc7eac12ac148423c92ebcca2f4ce30c451cdaaef0cb90deb944254490925
6
+ metadata.gz: 695c59e8167f0289cbc2c81e9d90c81829759fac4ee98ec9ffc5aeae79fea61f3cfadc7701ee08401ae77cb43f508b1521fdc4cf864a3172453bf59a1d5431d1
7
+ data.tar.gz: 373df4a3e625b0fd16e5a331907c702ff55436a74647613e01f473793688e6e35ffa8709fb2584c89e9b392dffa56492f930c2ec59e408edb24d3661e169e721
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.2] - 2026-02-16
2
+
3
+ - Add a :logs_out desugarizer
4
+
1
5
  ## [0.1.1] - 2026-01-27
2
6
 
3
7
  - Use lower-case header keys to appease Rack::Lint
@@ -8,8 +8,9 @@ module Foobara
8
8
 
9
9
  class << self
10
10
  def install!
11
- CommandConnectors::Http.register_authenticator(BearerAuthenticator)
12
- CommandConnectors::Http.register_authenticator(ApiKeyAuthenticator)
11
+ CommandConnectors::Http.register_authenticator BearerAuthenticator
12
+ CommandConnectors::Http.register_authenticator ApiKeyAuthenticator
13
+ CommandConnectors::Http.add_desugarizer Desugarizers::LogsOut
13
14
  end
14
15
  end
15
16
  end
@@ -0,0 +1,24 @@
1
+ module Foobara
2
+ module AuthHttp
3
+ module Desugarizers
4
+ class LogsOut < CommandConnectors::Desugarizer
5
+ def applicable?(args_and_opts)
6
+ args_and_opts.last[:logs_out]
7
+ end
8
+
9
+ def desugarize(args_and_opts)
10
+ args, opts = args_and_opts
11
+
12
+ opts = opts.merge(
13
+ request_mutators: Foobara::AuthHttp::SetRefreshTokenFromCookie,
14
+ response_mutators: Foobara::AuthHttp::ClearAccessTokenHeader
15
+ )
16
+
17
+ opts.delete(:logs_out)
18
+
19
+ [args, opts]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-auth-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -69,13 +69,14 @@ files:
69
69
  - LICENSE.txt
70
70
  - README.md
71
71
  - lib/foobara/auth_http.rb
72
- - src/foobara/auth_http/api_key_authenticator.rb
73
- - src/foobara/auth_http/bearer_authenticator.rb
74
- - src/foobara/auth_http/clear_access_token_header.rb
75
- - src/foobara/auth_http/move_access_token_to_header.rb
76
- - src/foobara/auth_http/move_refresh_token_to_cookie.rb
77
- - src/foobara/auth_http/set_refresh_token_from_cookie.rb
78
- - src/foobara/auth_http/set_user_to_authenticated_user.rb
72
+ - src/authenticators/api_key_authenticator.rb
73
+ - src/authenticators/bearer_authenticator.rb
74
+ - src/desugarizers/logs_out.rb
75
+ - src/request_mutators/set_refresh_token_from_cookie.rb
76
+ - src/request_mutators/set_user_to_authenticated_user.rb
77
+ - src/response_mutators/clear_access_token_header.rb
78
+ - src/response_mutators/move_access_token_to_header.rb
79
+ - src/response_mutators/move_refresh_token_to_cookie.rb
79
80
  homepage: https://github.com/foobara/auth-http
80
81
  licenses:
81
82
  - Apache-2.0 OR MIT