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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/foobara/auth_http.rb +3 -2
- data/src/desugarizers/logs_out.rb +24 -0
- metadata +9 -8
- /data/src/{foobara/auth_http → authenticators}/api_key_authenticator.rb +0 -0
- /data/src/{foobara/auth_http → authenticators}/bearer_authenticator.rb +0 -0
- /data/src/{foobara/auth_http → request_mutators}/set_refresh_token_from_cookie.rb +0 -0
- /data/src/{foobara/auth_http → request_mutators}/set_user_to_authenticated_user.rb +0 -0
- /data/src/{foobara/auth_http → response_mutators}/clear_access_token_header.rb +0 -0
- /data/src/{foobara/auth_http → response_mutators}/move_access_token_to_header.rb +0 -0
- /data/src/{foobara/auth_http → response_mutators}/move_refresh_token_to_cookie.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 016bcd816d77d49551a798013b1f1dc00a2b90999c7495b780d75262e8a847af
|
|
4
|
+
data.tar.gz: f3ea2ca603b95d0f31d38f46496cc95475a07d0c7fa9eaa1fdbd50f30ea566f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 695c59e8167f0289cbc2c81e9d90c81829759fac4ee98ec9ffc5aeae79fea61f3cfadc7701ee08401ae77cb43f508b1521fdc4cf864a3172453bf59a1d5431d1
|
|
7
|
+
data.tar.gz: 373df4a3e625b0fd16e5a331907c702ff55436a74647613e01f473793688e6e35ffa8709fb2584c89e9b392dffa56492f930c2ec59e408edb24d3661e169e721
|
data/CHANGELOG.md
CHANGED
data/lib/foobara/auth_http.rb
CHANGED
|
@@ -8,8 +8,9 @@ module Foobara
|
|
|
8
8
|
|
|
9
9
|
class << self
|
|
10
10
|
def install!
|
|
11
|
-
CommandConnectors::Http.register_authenticator
|
|
12
|
-
CommandConnectors::Http.register_authenticator
|
|
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.
|
|
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/
|
|
73
|
-
- src/
|
|
74
|
-
- src/
|
|
75
|
-
- src/
|
|
76
|
-
- src/
|
|
77
|
-
- src/
|
|
78
|
-
- src/
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|